Last active
January 29, 2022 11:01
-
-
Save josfaber/336c43c3eae16cf6a036f1f541457cd9 to your computer and use it in GitHub Desktop.
PHP get full server url
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$full_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment