ohdang888 Posted December 1, 2008 Share Posted December 1, 2008 what string can be called that is the whole page and the get vars... like this: index.php?step=1&go=435&key=54q523nkj thanks. Link to comment https://forums.phpfreaks.com/topic/134934-solved-get-vars/ Share on other sites More sharing options...
rhodesa Posted December 1, 2008 Share Posted December 1, 2008 do you mean $_SERVER['REQUEST_URI'] Link to comment https://forums.phpfreaks.com/topic/134934-solved-get-vars/#findComment-702709 Share on other sites More sharing options...
ohdang888 Posted December 1, 2008 Author Share Posted December 1, 2008 that gives you it from the root URL... went i echo that i get this.. /dev/index.php?Sdfg I just want: index.php?Sdfg Thanks Link to comment https://forums.phpfreaks.com/topic/134934-solved-get-vars/#findComment-702713 Share on other sites More sharing options...
DarkWater Posted December 1, 2008 Share Posted December 1, 2008 Although I hardly doubt that basename() was intended for this, it works. echo basename($_SERVER['REQUEST_URI']); Link to comment https://forums.phpfreaks.com/topic/134934-solved-get-vars/#findComment-702714 Share on other sites More sharing options...
rhodesa Posted December 1, 2008 Share Posted December 1, 2008 that is interesting that basename works...just to make sure, i would do: $url = basename($_SERVER['PHP_SELF']); if($_SERVER['QUERY_STRING']) $url .= '?'.$_SERVER['QUERY_STRING']; echo $url; Link to comment https://forums.phpfreaks.com/topic/134934-solved-get-vars/#findComment-702720 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.