Jump to content

Url Path


barkster

Recommended Posts

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 Result
www.domain.com/test/Test.php?234243=1231

I tried
$url = $_SERVER['HTTP_HOST'] . basename($_SERVER['REQUEST_URI']);

but gives me
www.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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.