Created
September 25, 2010 21:07
-
-
Save joshtronic/597305 to your computer and use it in GitHub Desktop.
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
/** | |
* Is Local | |
* | |
* Checks if the current site is hosted locally or not. | |
* | |
* @static | |
* @return boolean whether or not the site is hosted locally | |
*/ | |
public static function isLocal() | |
{ | |
return ((isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] == '127.0.0.1') || (isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == 'local')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment