EchoFool Posted June 20, 2009 Share Posted June 20, 2009 I have a script in the location of: staff/staffpanel.php And i want to grab just the sub folder name so i can check it in a if statement... how ever as im checking it from an include which might not always be in a sub folder script... What happens if say it grabs the directory name when viewing a script which is in root and not in a sub folder will it just grab nothing or will it error? Quote Link to comment https://forums.phpfreaks.com/topic/163062-solved-get-script-directory-folder-name/ Share on other sites More sharing options...
RussellReal Posted June 20, 2009 Share Posted June 20, 2009 $_SERVER['request_uri'].. I guess, or just print_r($_SERVER) and see which variable is more valuable to you Quote Link to comment https://forums.phpfreaks.com/topic/163062-solved-get-script-directory-folder-name/#findComment-860411 Share on other sites More sharing options...
EchoFool Posted June 20, 2009 Author Share Posted June 20, 2009 Thanks Quote Link to comment https://forums.phpfreaks.com/topic/163062-solved-get-script-directory-folder-name/#findComment-860415 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.