KittyKate Posted August 18, 2006 Share Posted August 18, 2006 I want to check to see what the location is to see if I need to print certain information or not. So, how do I pull the "*.php" part of address? I can figure out how to set it, or grab it within my HTML (using DOM), but how do I grab it on the server side? Quote Link to comment https://forums.phpfreaks.com/topic/17968-get-location/ Share on other sites More sharing options...
ToonMariner Posted August 18, 2006 Share Posted August 18, 2006 $_SEREVER['PHP_SELF'] or $_SERVER['SCRIPT_NAME'] or $_SEREVER['FILE_NAME']check out the super globals array to see merits of each Quote Link to comment https://forums.phpfreaks.com/topic/17968-get-location/#findComment-76863 Share on other sites More sharing options...
wildteen88 Posted August 18, 2006 Share Posted August 18, 2006 $_SERVER['PHP_SELF'] or $_SERVER['SCRIPT_NAME']Hehe too slow :( Quote Link to comment https://forums.phpfreaks.com/topic/17968-get-location/#findComment-76864 Share on other sites More sharing options...
Ifa Posted August 18, 2006 Share Posted August 18, 2006 or __FILE__ :D Quote Link to comment https://forums.phpfreaks.com/topic/17968-get-location/#findComment-76865 Share on other sites More sharing options...
KittyKate Posted August 18, 2006 Author Share Posted August 18, 2006 Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/17968-get-location/#findComment-76868 Share on other sites More sharing options...
ryanlwh Posted August 18, 2006 Share Posted August 18, 2006 also check out basename() to use with PHP_SELF and such Quote Link to comment https://forums.phpfreaks.com/topic/17968-get-location/#findComment-77047 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.