We help IT Professionals succeed at work.

PHP Current URL

ullfindsmit
ullfindsmit used Ask the Experts™
on
How to get the URL for the currently requested page

I am currently on IIS with php

Thanks
Smit.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Director of Software Development
Commented:
Try $PHP_SELF.
Commented:
try:
echo $_SERVER['REQUEST_URI']; //or
echo $_SERVER['PHP_SELF'];
Commented:
for the full URL:

$url = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];