RE: [PHP] Getting current page name without path

From: Date: Tue, 06 Sep 2005 07:19:20 +0000
Subject: RE: [PHP] Getting current page name without path
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-221886@lists.php.net to get a copy of this message
> I want to get the name of current page. I use $PHP_SELF or > SCRIPT_FILENAME, but it also provides the path name . I just want to > retrieve the file name with extension. How can I do that? > $_SERVER['SCRIPT_NAME'] and $_SERVER['ORIG_SCRIPT_NAME'] will give you the current filename without the path. I'm currently using PHP5.1RC so it might differ in your version but check out phpinfo.php These things are all displayed in phpinfo.php. George

« previous php.general (#221886) next »