Created
March 27, 2014 09:32
-
-
Save anytizer/9803735 to your computer and use it in GitHub Desktop.
Server variables safety
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
if(emtpy($_SERVER['REMOTE_ADDR'])) | |
{ | |
$_SERVER['REMOTE_ADDR'] = '127.0.0.1'; | |
} | |
if(emtpy($_SERVER['SERVER_NAME'])) | |
{ | |
$_SERVER['SERVER_NAME'] = 'localhost'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment