barkster Posted September 22, 2006 Share Posted September 22, 2006 I'm trying to get the full path of the url including any url parameters.for example I need http://www.domain.com/test/Test.php?234243=1231 I need Resultwww.domain.com/test/Test.php?234243=1231I tried $url = $_SERVER['HTTP_HOST'] . basename($_SERVER['REQUEST_URI']);but gives mewww.domain.com/Test.php?234243=1231 which is missing /test??Thanks Link to comment https://forums.phpfreaks.com/topic/21605-url-path/ Share on other sites More sharing options...
brendandonhue Posted September 22, 2006 Share Posted September 22, 2006 $_SERVER['REQUEST_URI'] should do what you want. Link to comment https://forums.phpfreaks.com/topic/21605-url-path/#findComment-96444 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.