From 04e364c3b7087a173c7c5efca0a867e5fdc98cf6 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 5 Sep 2016 16:36:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E9=BB=98=E8=AE=A4=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E6=96=87=E4=BB=B6=E7=9A=84=E8=AF=BB=E5=8F=96=20?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E5=99=A8=E7=9B=AE=E5=BD=95=E4=B8=BA=E5=B0=8F?= =?UTF-8?q?=E5=86=99=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/view/driver/Php.php | 2 +- library/think/view/driver/Think.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/library/think/view/driver/Php.php b/library/think/view/driver/Php.php index a7e72e9e..d9368692 100644 --- a/library/think/view/driver/Php.php +++ b/library/think/view/driver/Php.php @@ -117,7 +117,7 @@ class Php // 分析模板文件规则 $request = Request::instance(); - $controller = $request->controller(); + $controller = Loader::parseName($request->controller()); if ($controller && 0 !== strpos($template, '/')) { $depr = $this->config['view_depr']; $template = str_replace(['/', ':'], $depr, $template); diff --git a/library/think/view/driver/Think.php b/library/think/view/driver/Think.php index 1521eca3..d7ac5954 100644 --- a/library/think/view/driver/Think.php +++ b/library/think/view/driver/Think.php @@ -13,6 +13,7 @@ namespace think\view\driver; use think\App; use think\exception\TemplateNotFoundException; +use think\Loader; use think\Log; use think\Request; use think\Template; @@ -114,7 +115,7 @@ class Think // 分析模板文件规则 $request = Request::instance(); - $controller = $request->controller(); + $controller = Loader::parseName($request->controller()); if ($controller && 0 !== strpos($template, '/')) { $depr = $this->config['view_depr']; $template = str_replace(['/', ':'], $depr, $template);