From 53d8b4e362dfdcddcfba2e928e61306a98365026 Mon Sep 17 00:00:00 2001 From: wenquan <80071319@qq.com> Date: Wed, 15 Apr 2020 17:10:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8E=B7=E5=8F=96=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E7=AB=AFIP=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- function/function_core.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/function/function_core.php b/function/function_core.php index f273244..eb2b563 100644 --- a/function/function_core.php +++ b/function/function_core.php @@ -177,7 +177,8 @@ function get_real_ip() $ip = FALSE; } for ($i = 0; $i < count($ips); $i++) { - if (@!preg_match("^(10|172\.16|192\.168)\.", $ips[$i])) { + $istart = substr($str , 0 , 3); + if ($istart != "10." && $istart != "172" && $istart != "16." && $istart != "192" && $istart != "168"){ $ip = $ips[$i]; break; }