I am using the function $GLOBALS["SCRIPT_NAME"]; to try to locate the current webpage (script) being used, but instead it just returns the value /php/php.exe, I want something that gives me the current script in use. okay, I found this $_SERVER['PHP_SELF'] and that works, except, I need just the name of the document in use instead of the path also. So my desired output would be currentdoc.php instead of currentdocspaths/currentdoc.php Any suggestions?