From 570b5d1ed6a9093293016f2c4c3fce039e94ed62 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 30 Jan 2017 20:28:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BUrl=E7=B1=BB=E7=94=9F?= =?UTF-8?q?=E6=88=90=20root=E4=B8=BA/=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Url.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/think/Url.php b/library/think/Url.php index 51c846d7..d7dfd973 100644 --- a/library/think/Url.php +++ b/library/think/Url.php @@ -153,7 +153,8 @@ class Url // 检测域名 $domain = self::parseDomain($url, $domain); // URL组装 - $url = $domain . (self::$root ?: Request::instance()->root()) . '/' . ltrim($url, '/'); + $url = $domain . rtrim(self::$root ?: Request::instance()->root(), '/') . '/' . ltrim($url, '/'); + self::$bindCheck = false; return $url; }