note 41667 added to function.realpath
| From: | php-general at lists dot php dot net | Date: | Mon, 19 Apr 2004 02:20:24 +0000 |
| Subject: | note 41667 added to function.realpath | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-68310@lists.php.net to get a copy of this message | ||
it works on windows XP :)
if your script $_SERVER["PATH_TRANSLATED"]) is
c:\htdocs\mydir\script.php
returns c:\htdocs\mydir\
function get_path()
{
$script=explode("/",$_SERVER['PHP_SELF']);
$path= str_replace($script[sizeof($script)-1], "", $_SERVER["PATH_TRANSLATED"]);
return $path;
}
----
Manual Page -- http://www.php.net/manual/en/function.realpath.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+41667
Delete -- http://master.php.net/manage/user-notes.php?action=delete+41667&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+41667&report=yes
Search -- http://master.php.net/manage/user-notes.php