Re: page name string

From: Date: Mon, 16 Jun 2003 19:35:34 +0000
Subject: Re: page name string
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-151712@lists.php.net to get a copy of this message
> I need a really simple function that retrieves the actual page file name > from a URL. So, if the URL is > http://www.server.com/pagename.php, or if > it is http://www.server.com/directory/pagename.php, the > function in both > cases will return "pagename.php". > > I'm sorry if this is a ridiculously easy question, but I've combed > $_SERVER and Javascript and have come up with nothing, and I am > dumbfounded. Well, at least you admit it. :) $file = basename($_SERVER['PHP_SELF']); ---John Holmes...

« previous php.general (#151712) next »