Page is a not externally linkable
jatar_k - 3:08 am on Jan 18, 2004 (gmt 0)
which means the data you get will be somewhat unreliable. I would use SCRIPT_NAME or PHP_SELF it really depends on what you want to do with it. you could use split [ca.php.net] to chop the paths up on the /, which returns an array of the parts and then grab the last part. To return the last piece you could count [ca.php.net] the elements in the array and use that -1 and then reference the last element.
You have to remember that REQUEST_URI gives The URI which was given in order to access this page; for instance, '/index.html'. Contains the current script's path. This is useful for pages which need to point to themselves. The filename of the currently executing script, relative to the document root. For instance, $_SERVER['PHP_SELF'] in a script at the address http://example.com/test.php/foo.bar would be /test.php/foo.bar.