Last active
August 29, 2016 08:22
-
-
Save mrroot5/aa94a1546dd8b4433f2b to your computer and use it in GitHub Desktop.
Obtener protocolo http o https
From http://stackoverflow.com/questions/4503135/php-get-site-url-protocol-http-vs-https
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
$protocol = (stripos($_SERVER['SERVER_PROTOCOL'],'https') === true) ? 'https://' : 'http://'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment