修改ip限制

This commit is contained in:
“wanyongkang”
2024-02-18 11:32:16 +08:00
parent cac440ba9c
commit dfb347500e
2 changed files with 7 additions and 7 deletions

View File

@@ -5,7 +5,7 @@
* @Author: kangkang
* @Date: 2020-09-30 17:32:46
* @LastEditors: “wanyongkang” “937888580@qq.com”
* @LastEditTime: 2024-02-02 17:30:32
* @LastEditTime: 2024-02-18 11:30:43
*/
namespace fastphp\base;
@@ -44,11 +44,11 @@ class Controller
$getPayload=$jwt->verifyToken($_SERVER['HTTP_TOKEN']);
$ip = getIp();
// $ip_limit = trim(file_get_contents('/var/www/ip/ip'));
$ip_limit = trim(file_get_contents('/var/www/ip/ip'));
// if ((strpos($ip_limit, $ip) == false)&&$ip!=$ip_limit&&$getPayload['OperaterID']<100000) {
// if ((strpos($ip_limit, $ip) == false)&&$getPayload['OperaterID']<100000) {
// die;
// }
if ((strpos($ip_limit, $ip) == false)&&$getPayload['OperaterID']<100000) {
die;
}
} else {
die;
}