Created
May 29, 2013 10:38
-
-
Save dipesh008/5669413 to your computer and use it in GitHub Desktop.
HTTP OR 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
if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' | |
|| $_SERVER['SERVER_PORT'] == 443) { | |
// HTTPS | |
} else { | |
// HTTP | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment