note 50077 deleted from reserved.variables by felipe
| From: | felipe@php.net | Date: | Sun, 30 Dec 2007 18:17:39 +0000 |
| Subject: | note 50077 deleted from reserved.variables by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-134342@lists.php.net to get a copy of this message | ||
Note Submitter:
----
grlprgrmmr wrote:
you can use these to reconstructed the current page url.
<?php
echo 'http';
if($_SERVER['HTTPS']=='on'){echo 's';}
echo '://'.$_SERVER['SERVER_PORT'].$_SERVER['SCRIPT_NAME'];
if($_SERVER['QUERY_STRING']>' '){echo
'?'.$_SERVER['QUERY_STRING'];}
?>
______________
the $_SERVER['SERVER_PORT'] part should be changed to $_SERVER['HTTP_HOST']