ip限制
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
* @version:
|
||||
* @Author: kangkang
|
||||
* @Date: 2020-09-30 17:32:46
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @LastEditTime: 2022-03-22 16:55:43
|
||||
* @LastEditors: “wanyongkang” “937888580@qq.com”
|
||||
* @LastEditTime: 2022-05-13 16:58:13
|
||||
*/
|
||||
|
||||
namespace fastphp\base;
|
||||
@@ -44,10 +44,10 @@ class Controller
|
||||
$getPayload=$jwt->verifyToken($_SERVER['HTTP_TOKEN']);
|
||||
|
||||
$ip = getIp();
|
||||
// $ip_limit = file_get_contents('/var/www/ip/ip');
|
||||
// if ((strpos($ip_limit, $ip) == false)&&$ip!=$ip_limit&&$getPayload['OperaterID']<100000) {
|
||||
// die;
|
||||
// }
|
||||
$ip_limit = file_get_contents('/var/www/ip/ip');
|
||||
if ((strpos($ip_limit, $ip) == false)&&$ip!=$ip_limit&&$getPayload['OperaterID']<100000) {
|
||||
die;
|
||||
}
|
||||
} else {
|
||||
die;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user