note 46349 added to reserved.variables
| From: | medelibero | Date: | Thu, 07 Oct 2004 21:06:17 +0000 |
| Subject: | note 46349 added to reserved.variables | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-78151@lists.php.net to get a copy of this message | ||
/*
* This function is to compensate for CGI based PHP applications in windows
* not having DOCUMENT_ROOT within the server global array.
* It takes the element value of SCRIPT_FILENAME and removes the ORIG_SCRIPT_NAME value
*/
function getDocumentRoot() {
$sTmp = $_SERVER['ORIG_SCRIPT_NAME'];
$sDocRoot = $_SERVER['SCRIPT_FILENAME'];
// change the "/" to "\"
$sTmp = str_replace("/", "\\", $sTmp);
// remove the entry now
$sDocRoot = str_replace($sTmp, "", $sDocRoot);
return $sDocRoot;
}
----
Manual Page -- http://www.php.net/manual/en/reserved.variables.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+46349
Delete -- http://master.php.net/manage/user-notes.php?action=delete+46349&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+46349&report=yes
Search -- http://master.php.net/manage/user-notes.php