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=apple
>
>   print 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: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to