function getIP() { $realip = ''; //设置默认值 if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { ...