SyntaxFix
Write A Post
Hire A Developer
Questions
Fugly, but this will do it:
substr($_SERVER['SCRIPT_NAME'], 0, strpos($_SERVER['SCRIPT_NAME'],basename($_SERVER['SCRIPT_NAME'])))