note 21104 added to ref.url
| From: | postmaster at asmatic dot ch | Date: | Mon, 29 Apr 2002 13:15:25 +0000 |
| Subject: | note 21104 added to ref.url | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-29977@lists.php.net to get a copy of this message | ||
If you want to get the filename requested on a global error page like a 404, just use this code...
// get the full var...
$page = $HTTP_SERVER_VARS["QUERY_STRING"];
// part[1] is the url...
// part[0] is the http code (404, etc).
if(strpos($page,";")>0) {
$pageParts = explode(";",$page);
$page = $pageParts[1];
}
// get only the filename...
$page = basename($page);
--
http://www.php.net/manual/en/ref.url.php
http://master.php.net/manage/user-notes.php?action=edit+21104
http://master.php.net/manage/user-notes.php?action=delete+21104
http://master.php.net/manage/user-notes.php?action=reject+21104