金柚静态 支付修改3

This commit is contained in:
“wanyongkang”
2024-02-02 17:28:19 +08:00
parent 814fafb76c
commit 7af1b2358e

View File

@@ -5,7 +5,7 @@
* @Author: kangkang
* @Date: 2020-09-30 17:32:46
* @LastEditors: “wanyongkang” “937888580@qq.com”
* @LastEditTime: 2022-09-13 21:14:24
* @LastEditTime: 2024-02-02 17:27:51
*/
namespace fastphp\base;
@@ -22,6 +22,11 @@ class Controller
//初始化属性,实例化对应模型
public function __construct($controller,$action)
{
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
header('HTTP/1.1 405 Method Not Allowed');
header('Allow: GET, POST, PUT, DELETE');
exit;
}
$data = json_decode(file_get_contents("php://input"),true);
$getPayload = false;
if(isset($data['cookie'])){
@@ -44,11 +49,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;
}