Re: script filename?
| From: | Kurth Bemis | Date: | Sun, 25 Mar 2001 22:35:38 +0000 |
| Subject: | Re: script filename? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-45525@lists.php.net to get a copy of this message | ||
At 03:53 PM 3/25/2001, Philip Olson wrote:
thank you - that was the function that i was looking for!
~kurth
Hi Kurth, Check out basename() and use it against a predefined variable such as SCRIPT_NAME. Example :// /apples/foo.php?fruit=appleprint basename($SCRIPT_NAME); // foo.php Be sure to check out : http://www.php.net/manual/en/language.variables.predefined.php http://www.php.net/manual/en/function.basename.php Also check phpinfo() to view how your server deals with such things. Regards, Philip Olson http://www.cornado.com/ On Sun, 25 Mar 2001, Kurth Bemis wrote: i was pretty sure that there was a function to return JUST the script filename.. Unlike $php_self and $script_name i need something that till ruturn JUST the scriptname. ie /test/test/blah.php returns blah.php. any ideas? or am i going to have to reverse the string find the first "/" drop the rest of the string and return the file name. :-) ~kurth -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net