Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get current URL?

Status
Not open for further replies.

paulbradley

Programmer
Oct 9, 2002
158
GB
Is there a function to get whatever the URL of the current page is?

Thanks.
 
Try putting this in a php page (on its own) :

Code:
<?php

echo '<pre>';
print_r $_SERVER;
echo '</pre>';

?>
[code]

That will tell you what all the elements in the $_SERVER array are, you'll find what you need in there (along with other useful bits).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top