From f742c2f7b7b6f50676482b6f7a8b4670bd3db9d8 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 5 Jan 2016 23:42:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=8D=E6=AC=A1=E4=BC=98=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Route.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/Route.php b/library/think/Route.php index 70adef25..37649d36 100644 --- a/library/think/Route.php +++ b/library/think/Route.php @@ -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)) {