From b15188fc6ec6aac88a92ca0ee496562bd0148da2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwanyongkang=E2=80=9D?= <“937888580@qq.com”> Date: Wed, 27 Apr 2022 16:38:34 +0800 Subject: [PATCH] =?UTF-8?q?=E7=81=AB=E7=8B=90=E7=BA=BF=E8=B7=AF=E6=90=9C?= =?UTF-8?q?=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/linedata/search.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/script/linedata/search.php b/script/linedata/search.php index ff18ae4..4633df6 100755 --- a/script/linedata/search.php +++ b/script/linedata/search.php @@ -5,7 +5,7 @@ * @Author: kangkang * @Date: 2020-11-07 11:13:08 * @LastEditors: Please set LastEditors - * @LastEditTime: 2022-04-27 16:35:46 + * @LastEditTime: 2022-04-27 16:38:16 */ header('Access-Control-Allow-Origin: *'); header("Access-Control-Allow-Methods: *"); @@ -181,7 +181,11 @@ function search_product($file_path,$dns = ''){ $data['online'] = $info[7]; $data['status'] = $info[8]; $ip = explode('.',$info[9]); - $data['nasname'] = $ip[0]?ip_repeat($record,$ip[0]).'.'.$dns:''; + if (count($ip) == 4) { + $data['nasname'] = $info[9]; + } else { + $data['nasname'] = $ip[0]?ip_repeat($record,$ip[0]).'.'.$dns:''; + } $list[] = $data; } }