Created
September 28, 2017 19:57
-
-
Save dejurin/1bf2eba27bc823255fe5930047d8d8cc to your computer and use it in GitHub Desktop.
[PHP] get scheme from _SERVER
This file contains 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
<?php | |
$scheme = (isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] === 'on' || $_SERVER['HTTPS'] === 1)) ? 'https://':'http://'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment