Script for displaying URL

A

Anonymous

Guest
I cant figure out how to display the URL of the current page, exactly as it appears in the address bar.
Would it be something like:

<?php
echo $SERVER['CURRENT_URL'];
?>

Thanx.
 
First: $_SERVER[] and not $SERVER[] :)
You have that information in environment variables like HTTP_HOST, REQUEST_URI and/or QUERY_STRING.
I think the mix of the first two will do what you need.
 
Back
Top