> 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... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php