On Tue, 2002-02-12 at 13:16, Erik Price wrote:
> Is there already a built-in function that gets the basename of the
> current file?
>
> I wrote this:
>
> function get_current_page_name()
> {
> $current_page_name = explode("/", $_SERVER['PHP_SELF']);
> $current_page_name = array_slice($current_page_name, -1);
> return $current_page_name;
> }
>
> but I'm wondering if someone already did it for me.
>
>
>
> Erik
echo basename($_SERVER['PHP_SELF']);
http://www.php.net/basename
Hope this helps,
Torben
--
Torben Wilson <[EMAIL PROTECTED]>
http://www.thebuttlesschaps.com
http://www.hybrid17.com
http://www.inflatableeye.com
+1.604.709.0506
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php