note 49865 deleted from reserved.variables by felipe
| From: | felipe@php.net | Date: | Sun, 30 Dec 2007 18:17:48 +0000 |
| Subject: | note 49865 deleted from reserved.variables by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-134343@lists.php.net to get a copy of this message | ||
Note Submitter: grlprgrmmr uses gmail
----
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'];}
?>
If $_SERVER['HTTPS']=='on' does not work for you,
try $_SERVER['SERVER_PORT']==443 (or whatever secure port is used)