Skip to content

Instantly share code, notes, and snippets.

@josfaber
Last active January 29, 2022 11:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josfaber/336c43c3eae16cf6a036f1f541457cd9 to your computer and use it in GitHub Desktop.
Save josfaber/336c43c3eae16cf6a036f1f541457cd9 to your computer and use it in GitHub Desktop.
PHP get full server url
$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