static function getSymbolicPath($realpath)
    {
        $root = $_SERVER['DOCUMENT_ROOT'];
        $script = $_SERVER['SCRIPT_FILENAME'];
        $root = str_replace('\\', '/', $root);
        $script = str_replace('\\', '/', $script);
        $realpath = str_replace('\\', '/', $realpath);
        
        $dir = str_replace($root, '', $script);
        $pos = false;
        $dir = self::getDir($dir);
        while (! empty($dir)) {
            $pos = strpos($realpath, $dir);
            if ($pos) {
                break;
            }
            $dir = self::getDir($dir);
        }
        if ($pos) {
            $realpath = $root . substr($realpath, $pos);
        }
        return $realpath;
    }
static function getSymbolicPath($realpath)
    {
        $root = $_SERVER['DOCUMENT_ROOT'];
        $script = $_SERVER['SCRIPT_FILENAME'];
        $root = str_replace('\\', '/', $root);
        $script = str_replace('\\', '/', $script);
        $realpath = str_replace('\\', '/', $realpath);
        
        $dir = str_replace($root, '', $script);
        $pos = false;
        $dir = self::getDir($dir);
        while (! empty($dir)) {
            $pos = strpos($realpath, $dir);
            if ($pos) {
                break;
            }
            $dir = self::getDir($dir);
        }
        if ($pos) {
            $realpath = $root . substr($realpath, $pos);
        }
        return $realpath;
    }
static function getSymbolicPath ( $ realpath ) { $ root = $ _SERVER [ 'DOCUMENT_ROOT' ] ; $ script = $ _SERVER [ 'SCRIPT_FILENAME' ] ; $ root = str_replace ( '\\' , '/' , $ root ) ; $ script = str_replace ( '\\' , '/' , $ script ) ; $ realpath = str_replace ( '\\' , '/' , $ realpath ) ; $ dir = str_replace ( $ root , '' , $ script ) ; $ pos = false ; $ dir = self :: getDir ( $ dir ) ; while ( ! empty ( $ dir ) ) { $ pos = strpos ( $ realpath , $ dir ) ; if ( $ pos ) { break ; } $ dir = self :: getDir ( $ dir ) ; } if ( $ pos ) { $ realpath = $ root . substr ( $ realpath , $ pos ) ; } return $ realpath ; }
Get the dirname

@param string $realpath The real path

@return string Return the symbolic path
Get the dirname