优化错误提示,优化辅种匹配算法

This commit is contained in:
iyuu.cn
2020-01-22 20:00:01 +08:00
parent 9044d3575e
commit 66490efad7

View File

@ -126,7 +126,7 @@ class AutoReseed
$res = $curl->post(self::$apiUrl); $res = $curl->post(self::$apiUrl);
$sites = json_decode($res->response, true); $sites = json_decode($res->response, true);
// 数据写入本地 // 数据写入本地
if (true) { if ($sites) {
$json = array_column($sites, null, 'site'); $json = array_column($sites, null, 'site');
ksort($json); ksort($json);
$json = json_encode($json, JSON_UNESCAPED_UNICODE); $json = json_encode($json, JSON_UNESCAPED_UNICODE);
@ -134,6 +134,8 @@ class AutoReseed
$file_pointer = @fopen($myfile, "w"); $file_pointer = @fopen($myfile, "w");
$worldsnum = @fwrite($file_pointer, $json); $worldsnum = @fwrite($file_pointer, $json);
@fclose($file_pointer); @fclose($file_pointer);
}else {
die('远端服务器无响应,请稍后再试!!!');
} }
$data = []; $data = [];
$i = $j = $k = 0; $i = $j = $k = 0;