- 优化二级目录使用

This commit is contained in:
icret
2024-05-07 13:52:54 +08:00
parent 9f512bcf2d
commit 0f89648b76
12 changed files with 178 additions and 110 deletions

View File

@@ -68,7 +68,7 @@ class Ip2Region
$geo = $this->memorySearch($ip);
$arr = explode('|', str_replace(['0|'], '|', isset($geo['region']) ? $geo['region'] : ''));
if (($last = array_pop($arr)) === '内网IP') $last = '';
return join('', $arr) . (empty($last) ? '' : "[{$last}]");
return join('', $arr) . (empty($last) ? '' : "{$last}");
}
/**