note 41667 deleted from function.realpath by aidan
| From: | aidan@php.net | Date: | Sun, 29 Aug 2004 21:49:43 +0000 |
| Subject: | note 41667 deleted from function.realpath by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-75601@lists.php.net to get a copy of this message | ||
Note Submitter:
----
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;
}