예제 #1
0
파일: MvcCore.php 프로젝트: mvccore/mvccore
 public static function GetEnvironment()
 {
     if (!self::$_environment) {
         $serverAddress = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : $_SERVER['LOCAL_ADDR'];
         $remoteAddress = $_SERVER['REMOTE_ADDR'];
         if ($serverAddress == $remoteAddress) {
             self::$_environment = 'development';
         } else {
             self::$_environment = 'production';
         }
     }
     return self::$_environment;
 }