Commit bde03562 authored by shajiaiming's avatar shajiaiming

fix

parent 209ef2ac
...@@ -12,18 +12,18 @@ define('WALLET_PROJECT_PATH', '/data_wallet/token'); //定义框架代码的目 ...@@ -12,18 +12,18 @@ define('WALLET_PROJECT_PATH', '/data_wallet/token'); //定义框架代码的目
define('WALLET_RUNTIME_PATH', dirname(__DIR__)); //定义程序运行的目录 define('WALLET_RUNTIME_PATH', dirname(__DIR__)); //定义程序运行的目录
require_once __DIR__ . '/../common/helper/InitAppHelper.php'; require_once __DIR__ . '/../common/helper/InitAppHelper.php';
$realip = InitAppHelper::getUserIp(); //$realip = InitAppHelper::getUserIp();
$ip_list = file_get_contents('http://172.16.0.230:8080/wallet_interface_ip_limit.txt'); //$ip_list = file_get_contents('http://172.16.0.230:8080/wallet_interface_ip_limit.txt');
$ip_arr = explode("\n", $ip_list); //$ip_arr = explode("\n", $ip_list);
foreach ($ip_arr as $key => $ip) { //foreach ($ip_arr as $key => $ip) {
if ($ip == $realip) { // if ($ip == $realip) {
$data = [ // $data = [
'code' => 403, // 'code' => 403,
'msg' => '请求次数过多!' // 'msg' => '请求次数过多!'
]; // ];
echo json_encode($data);exit; // echo json_encode($data);exit;
} // }
} //}
require WALLET_PROJECT_PATH . '/vendor/autoload.php'; require WALLET_PROJECT_PATH . '/vendor/autoload.php';
require WALLET_PROJECT_PATH . '/vendor/yiisoft/yii2/Yii.php'; require WALLET_PROJECT_PATH . '/vendor/yiisoft/yii2/Yii.php';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment