再次优化代码

This commit is contained in:
thinkphp
2016-01-05 23:42:09 +08:00
parent e8291926cc
commit f742c2f7b7

View File

@@ -182,7 +182,7 @@ class Route
// 配置域名根 com.cn net.cn 之类的域名需要配置
$domain = explode('.', rtrim(stristr($_SERVER['HTTP_HOST'], $rootDomain, true), '.'));
} else {
$domain = array_slice(explode('.', $_SERVER['HTTP_HOST']), 0, -2);
$domain = explode('.', $_SERVER['HTTP_HOST'], -2);
}
// 子域名配置
if (!empty($domain)) {