Fix situation where AppDB is not at DocumentRoot

This commit is contained in:
Tony Lambregts
2005-07-27 02:10:56 +00:00
committed by WineHQ
parent a45a1fa869
commit 324ed66eae
3 changed files with 12 additions and 9 deletions

View File

@@ -36,9 +36,13 @@ function apidb_fullurl($path = "")
return BASE.$path;
}
function apidb_fullpath($path)
function appdb_fullpath($path)
{
return $_SERVER['DOCUMENT_ROOT'].BASE.$path;
/* IE: we know this file is in /yyy/xxx/include, we want to get the /yyy/xxx
/* so we call dirname on this file path twice */
$fullpath = dirname(dirname(__FILE__))."//".$path;
/* get rid of potential double slashes due to string concat */
return str_replace("//", "/", $fullpath);
}