private static function setRoot($url)
    {
        $segements = explode('/', $url);
        $count = count($segements) - 2;

        $path = '';

        for ($i = 0; $i < $count; $i++) {
            $path .= '../';
        }

        Application::$path .= $path;

        return Application::$path;
    }
private static function setRoot($url)
    {
        $segements = explode('/', $url);
        $count = count($segements) - 2;

        $path = '';

        for ($i = 0; $i < $count; $i++) {
            $path .= '../';
        }

        Application::$path .= $path;

        return Application::$path;
    }
private static function setRoot ( $ url ) { $ segements = explode ( '/' , $ url ) ; $ count = count ( $ segements ) - 2 ; $ path = '' ; for ( $ i = 0 ; $ i < $ count ; $ i ++ ) { $ path .= '../' ; } Application :: $ path .= $ path ; return Application :: $ path ; }
Set the app root param.

@param string $url

@return string
Set the app root param .