From 22b6b9ccb6e4de002d774dd16c3ad28d01df4113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwanyongkang=E2=80=9D?= <“937888580@qq.com”> Date: Sat, 30 Jul 2022 13:48:46 +0800 Subject: [PATCH] ip --- fastphp/base/Controller.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/fastphp/base/Controller.php b/fastphp/base/Controller.php index 3136e2f..b9b0410 100644 --- a/fastphp/base/Controller.php +++ b/fastphp/base/Controller.php @@ -5,7 +5,7 @@ * @Author: kangkang * @Date: 2020-09-30 17:32:46 * @LastEditors: “wanyongkang” “937888580@qq.com” - * @LastEditTime: 2022-07-30 13:35:33 + * @LastEditTime: 2022-07-30 13:46:22 */ namespace fastphp\base; @@ -43,11 +43,12 @@ class Controller $jwt = new Jwt('etor_yh_lzh_20f_2020_YES'); $getPayload=$jwt->verifyToken($_SERVER['HTTP_TOKEN']); - // $ip = getIp(); - // $ip_limit = trim(file_get_contents('/var/www/ip/ip')); + $ip = getIp(); + $ip_limit = trim(file_get_contents('/var/www/ip/ip')); // if ((strpos($ip_limit, $ip) == false)&&$ip!=$ip_limit&&$getPayload['OperaterID']<100000) { - // die; - // } + if ((strpos($ip_limit, $ip) == false)&&$getPayload['OperaterID']<100000) { + die; + } } else { die; }