How To Find the Complete Page URL in PHP

1 2 3 4 5 |
$URL = 'http'; if ($_SERVER["HTTPS"] == "on") { $URL .= "s"; } $URL .= '://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; |
1 2 3 4 5 |
$URL = 'http'; if ($_SERVER["HTTPS"] == "on") { $URL .= "s"; } $URL .= '://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; |
Categories: How-To's, Technology Tags: $_SERVER, apache, howto, HTTP_HOST, php, REQUEST_URI, Server, tips, URL
|
No comments
Copyright © 2005-2025 Eric Michael Stone | Random Thoughts, Whims and Fancies…. Powered by WordPress