keven/root-dir Install The rootDir() function requires Composer to be part of the project. The best way to install this packqage is to use Composer as well: $ composer require keven/root-dir Usage <?php use function Keven\rootDir; $rootDir = rootDir();