Welcome to WebmasterWorld Guest from 184.108.40.206
Anyone would think that some of these methods should return the file name:
But *ALL* of those methods return "projects/main.php"... d'oh! How can I retrieve the file name ONLY, without path?
Thanks in advance
$arrStr = explode("/", $_SERVER['SCRIPT_NAME'] );
$arrStr = array_reverse($arrStr );
echo("Script is " . $arrStr);
it is a little more clumsy than basename, but it is one solution and an idea on how to pull data from an array.