Commit a27f96e8 authored by shajiaiming's avatar shajiaiming

fix

parent 16ed964c
......@@ -13,21 +13,19 @@ define('WALLET_RUNTIME_PATH', dirname(__DIR__)); //定义程序运行的目录
if (isset($_GET['env']) && 'test' == $_GET['env']) {
require_once __DIR__ . '/../common/helper/InitAppHelper.php';
#if (defined('REQ_ORIGIN')){
$realip = InitAppHelper::getUserIp();
echo $realip;exit;
$ip_list = file_get_contents('/data_wallet/api_ip_limit.txt');
$ip_list = file_get_contents('http://47.100.212.109/api_ip_limit.txt');
$ip_arr = explode("\n", $ip_list);
foreach ($ip_arr as $key => $ip){
if ($ip == $realip){
foreach ($ip_arr as $key => $ip) {
if ($ip == $realip) {
$data = [
'code' => 403,
'message' => '请求次数过多!'
];
echo json_encode($data);exit;
echo json_encode($data);
exit;
}
}
#}
}
require WALLET_PROJECT_PATH . '/vendor/autoload.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