Jump to content


Photo

Url Path


  • Please log in to reply
1 reply to this topic

#1 barkster

barkster
  • Members
  • PipPipPip
  • Advanced Member
  • 194 posts

Posted 22 September 2006 - 01:20 AM

I'm trying to get the full path of the url including any url parameters.

for example I need http://www.domain.co...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

#2 brendandonhue

brendandonhue
  • Members
  • PipPipPip
  • Advanced Member
  • 65 posts

Posted 22 September 2006 - 02:11 AM

$_SERVER['REQUEST_URI'] should do what you want.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users