static function url2fullPath($url) {
        $url = self::normalize($url);

        $uri = isset($_SERVER['SCRIPT_NAME'])
            ? $_SERVER['SCRIPT_NAME'] : (isset($_SERVER['PHP_SELF'])
            ? $_SERVER['PHP_SELF']
            : false);

        $uri = self::normalize($uri);

        if (substr($url, 0, 1) !== "/") {
            if ($uri === false) return false;
            $url = dirname($uri) . "/$url";
        }

        if (isset($_SERVER['DOCUMENT_ROOT'])) {
            return self::normalize($_SERVER['DOCUMENT_ROOT'] . "/$url");

        } else {
            if ($uri === false) return false;

            if (isset($_SERVER['SCRIPT_FILENAME'])) {
                $scr_filename = self::normalize($_SERVER['SCRIPT_FILENAME']);
                return self::normalize(substr($scr_filename, 0, -strlen($uri)) . "/$url");
            }

            $count = count(explode('/', $uri)) - 1;
            for ($i = 0, $chdir = ""; $i < $count; $i++)
                $chdir .= "../";
            $chdir = self::normalize($chdir);

            $dir = getcwd();
            if (($dir === false) || !@chdir($chdir))
                return false;
            $rdir = getcwd();
            chdir($dir);
            return ($rdir !== false) ? self::normalize($rdir . "/$url") : false;
        }
    }
static function url2fullPath($url) {
        $url = self::normalize($url);

        $uri = isset($_SERVER['SCRIPT_NAME'])
            ? $_SERVER['SCRIPT_NAME'] : (isset($_SERVER['PHP_SELF'])
            ? $_SERVER['PHP_SELF']
            : false);

        $uri = self::normalize($uri);

        if (substr($url, 0, 1) !== "/") {
            if ($uri === false) return false;
            $url = dirname($uri) . "/$url";
        }

        if (isset($_SERVER['DOCUMENT_ROOT'])) {
            return self::normalize($_SERVER['DOCUMENT_ROOT'] . "/$url");

        } else {
            if ($uri === false) return false;

            if (isset($_SERVER['SCRIPT_FILENAME'])) {
                $scr_filename = self::normalize($_SERVER['SCRIPT_FILENAME']);
                return self::normalize(substr($scr_filename, 0, -strlen($uri)) . "/$url");
            }

            $count = count(explode('/', $uri)) - 1;
            for ($i = 0, $chdir = ""; $i < $count; $i++)
                $chdir .= "../";
            $chdir = self::normalize($chdir);

            $dir = getcwd();
            if (($dir === false) || !@chdir($chdir))
                return false;
            $rdir = getcwd();
            chdir($dir);
            return ($rdir !== false) ? self::normalize($rdir . "/$url") : false;
        }
    }
static function url2fullPath ( $ url ) { $ url = self :: normalize ( $ url ) ; $ uri = isset ( $ _SERVER [ 'SCRIPT_NAME' ] ) ? $ _SERVER [ 'SCRIPT_NAME' ] : ( isset ( $ _SERVER [ 'PHP_SELF' ] ) ? $ _SERVER [ 'PHP_SELF' ] : false ) ; $ uri = self :: normalize ( $ uri ) ; if ( substr ( $ url , 0 , 1 ) !== "/" ) { if ( $ uri === false ) return false ; $ url = dirname ( $ uri ) . "/$url" ; } if ( isset ( $ _SERVER [ 'DOCUMENT_ROOT' ] ) ) { return self :: normalize ( $ _SERVER [ 'DOCUMENT_ROOT' ] . "/$url" ) ; } else { if ( $ uri === false ) return false ; if ( isset ( $ _SERVER [ 'SCRIPT_FILENAME' ] ) ) { $ scr_filename = self :: normalize ( $ _SERVER [ 'SCRIPT_FILENAME' ] ) ; return self :: normalize ( substr ( $ scr_filename , 0 , - strlen ( $ uri ) ) . "/$url" ) ; } $ count = count ( explode ( '/' , $ uri ) ) - 1 ; for ( $ i = 0 , $ chdir = "" ; $ i < $ count ; $ i ++ ) $ chdir .= "../" ; $ chdir = self :: normalize ( $ chdir ) ; $ dir = getcwd ( ) ; if ( ( $ dir === false ) || ! @ chdir ( $ chdir ) ) return false ; $ rdir = getcwd ( ) ; chdir ( $ dir ) ; return ( $ rdir !== false ) ? self :: normalize ( $ rdir . "/$url" ) : false ; } }
Resolve full filesystem path of given URL. Returns FALSE if the URL
cannot be resolved
@param string $url
@return string
Resolve full filesystem path of given URL . Returns FALSE if the URL cannot be resolved