src/core/Application.php
protected function detectFsRoot()
    {
        Eresus_Kernel::log(__METHOD__, LOG_DEBUG, 'start');
        switch (true)
        {
            case Eresus_Kernel::isCLI():
                $path = reset($GLOBALS['argv']);
                Eresus_Kernel::log(__METHOD__, LOG_DEBUG, 'Using global $argv variable: %s', $path);
                $path = dirname($path);
                break;
            default:
                Eresus_Kernel::log(__METHOD__, LOG_DEBUG, 'Using $_SERVER["SCRIPT_FILENAME"]: %s',
                    $_SERVER['SCRIPT_FILENAME']);
                $path = dirname($_SERVER['SCRIPT_FILENAME']);
        }

        $path = Eresus_FS_Tool::normalize($path);
        Eresus_Kernel::log(__METHOD__, LOG_DEBUG, '"%s"', $path);

        return $path;
    }
protected function detectFsRoot()
    {
        Eresus_Kernel::log(__METHOD__, LOG_DEBUG, 'start');
        switch (true)
        {
            case Eresus_Kernel::isCLI():
                $path = reset($GLOBALS['argv']);
                Eresus_Kernel::log(__METHOD__, LOG_DEBUG, 'Using global $argv variable: %s', $path);
                $path = dirname($path);
                break;
            default:
                Eresus_Kernel::log(__METHOD__, LOG_DEBUG, 'Using $_SERVER["SCRIPT_FILENAME"]: %s',
                    $_SERVER['SCRIPT_FILENAME']);
                $path = dirname($_SERVER['SCRIPT_FILENAME']);
        }

        $path = Eresus_FS_Tool::normalize($path);
        Eresus_Kernel::log(__METHOD__, LOG_DEBUG, '"%s"', $path);

        return $path;
    }
protected function detectFsRoot ( ) { Eresus_Kernel :: log ( __METHOD__ , LOG_DEBUG , 'start' ) ; switch ( true ) { case Eresus_Kernel :: isCLI ( ) : $ path = reset ( $ GLOBALS [ 'argv' ] ) ; Eresus_Kernel :: log ( __METHOD__ , LOG_DEBUG , 'Using global $argv variable: %s' , $ path ) ; $ path = dirname ( $ path ) ; break ; default : Eresus_Kernel :: log ( __METHOD__ , LOG_DEBUG , 'Using $_SERVER["SCRIPT_FILENAME"]: %s' , $ _SERVER [ 'SCRIPT_FILENAME' ] ) ; $ path = dirname ( $ _SERVER [ 'SCRIPT_FILENAME' ] ) ; } $ path = Eresus_FS_Tool :: normalize ( $ path ) ; Eresus_Kernel :: log ( __METHOD__ , LOG_DEBUG , '"%s"' , $ path ) ; return $ path ; }
Trying to determine application root directory

In CLI mode $GLOBALS['argv'][0] used.

In other modes $_SERVER['SCRIPT_FILENAME'] used.

@return string
@see fsRoot, getFsRoot()
Trying to determine application root directory