note 62039 deleted from function.pathinfo by nlopess
| From: | nlopess@php.net | Date: | Tue, 25 Apr 2006 21:15:05 +0000 |
| Subject: | note 62039 deleted from function.pathinfo by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-109696@lists.php.net to get a copy of this message | ||
Note Submitter: imran at imranaziz dot net
----
If you want to get current http path of your script, use this function:
function getCurrentPath()
{
$host = $_SERVER[HTTP_HOST ];
$page = $_SERVER[PHP_SELF];
$address = "http://$host$page";
echo dirname($address);
}