Re: SCRIPT_NAME
| From: | Minuk Choi | Date: | Fri, 21 Oct 2005 03:27:21 +0000 |
| Subject: | Re: SCRIPT_NAME | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-224380@lists.php.net to get a copy of this message | ||
Off the top of my head...
$filename = $_SERVER['PHP_SELF'];
$strippedFilename = substr($filename, strrpos($filename, '/'));
references :
http://us3.php.net/substr
http://us3.php.net/manual/en/function.strrpos.php
-Minuk
John Taylor-Johnston wrote:
SCRIPT_NAME and PHP_SELF always include leading url information and slashes. Is there a function I can use to skin either down to the filename? No slashes or leading url. John