note 76813 deleted from reserved.variables by felipe
| Newsgroups | php.notes |
|---|---|
| Message-ID | <[email protected]> |
Note Submitter: From Under A Rock...
----
This small snippet will build the current script's url. No muss, no fuss:
<?php
$self_url = sprintf('http%s://%s%s',
(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == TRUE ? 's': ''),
$_SERVER['HTTP_HOST'],
$_SERVER['REQUEST_URI']
);
?>