示例#1
0
 public static function getRemoteIp(Zend_Controller_Request_Abstract $request)
 {
     if (!self::$_remoteIp) {
         self::$_remoteIp = $request->getServer('REMOTE_ADDR') ? $request->getServer('REMOTE_ADDR') : ($request->getEnv('REMOTE_ADDR') ? $request->getEnv('REMOTE_ADDR') : $request->getServer('HTTP_X_FORWARDED_FOR'));
     }
     return self::$_remoteIp;
 }