lib/ezutils/classes/ezsys.php
public static function rootDir()
    {
        $instance = self::instance();
        if ( !$instance->RootDir )
        {
            $cwd  = getcwd();
            $self  = $instance->serverVariable( 'PHP_SELF' );
            if ( file_exists( $cwd . $instance->FileSeparator . $self ) or
                 file_exists( $cwd . $instance->FileSeparator . $instance->IndexFile ) )
            {
                $instance->RootDir = $cwd;
            }
            else
            {
                $instance->RootDir = null;
            }
        }
        return $instance->RootDir;
    }
public static function rootDir()
    {
        $instance = self::instance();
        if ( !$instance->RootDir )
        {
            $cwd  = getcwd();
            $self  = $instance->serverVariable( 'PHP_SELF' );
            if ( file_exists( $cwd . $instance->FileSeparator . $self ) or
                 file_exists( $cwd . $instance->FileSeparator . $instance->IndexFile ) )
            {
                $instance->RootDir = $cwd;
            }
            else
            {
                $instance->RootDir = null;
            }
        }
        return $instance->RootDir;
    }
public static function rootDir ( ) { $ instance = self :: instance ( ) ; if ( ! $ instance -> RootDir ) { $ cwd = getcwd ( ) ; $ self = $ instance -> serverVariable ( 'PHP_SELF' ) ; if ( file_exists ( $ cwd . $ instance -> FileSeparator . $ self ) or file_exists ( $ cwd . $ instance -> FileSeparator . $ instance -> IndexFile ) ) { $ instance -> RootDir = $ cwd ; } else { $ instance -> RootDir = null ; } } return $ instance -> RootDir ; }
Returns the absolute path to the eZ Publish root directory

@return string|null
Returns the absolute path to the eZ Publish root directory