src/Config/ConfigInfo.php
function getPwd($file) {
        $root = $this->dirroot;
        $path = realpath(dirname($file));
        $root .= '/'; // Add the trailing slash
        if ( strlen($path) < strlen($root) ) return false;
        // The root must be the prefix of path
        if ( strpos($path, $root) !== 0 ) return false;
        $retval = substr($path, strlen($root));
        return $retval;
    }
function getPwd($file) {
        $root = $this->dirroot;
        $path = realpath(dirname($file));
        $root .= '/'; // Add the trailing slash
        if ( strlen($path) < strlen($root) ) return false;
        // The root must be the prefix of path
        if ( strpos($path, $root) !== 0 ) return false;
        $retval = substr($path, strlen($root));
        return $retval;
    }
function getPwd ( $ file ) { $ root = $ this -> dirroot ; $ path = realpath ( dirname ( $ file ) ) ; $ root .= '/' ; // Add the trailing slash if ( strlen ( $ path ) < strlen ( $ root ) ) return false ; // The root must be the prefix of path if ( strpos ( $ path , $ root ) !== 0 ) return false ; $ retval = substr ( $ path , strlen ( $ root ) ) ; return $ retval ; }
Get the current working directory of a file
Get the current working directory of a file