From 08f648966c8bd188fda8f3d50cd9e27c8c789ee6 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 9 Dec 2016 15:11:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3View=E7=B1=BB=E7=9A=84root?= =?UTF-8?q?=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/View.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/View.php b/library/think/View.php index 6edd69a0..6a96b740 100644 --- a/library/think/View.php +++ b/library/think/View.php @@ -40,7 +40,7 @@ class View // 基础替换字符串 $request = Request::instance(); $base = $request->root(); - $root = strpos($base, '.') ? dirname($base) : $base; + $root = strpos($base, '.') ? ltrim(dirname($base), '\\') : $base; if ('' != $root) { $root = '/' . $root; }