From 40153f4fd8deaacb5be825b5c7307a827d63729a Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 20 Dec 2015 19:13:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9Btemplate=E7=B1=BB=E7=9A=84par?= =?UTF-8?q?seTemplateFile=E6=96=B9=E6=B3=95=20=E6=94=AF=E6=8C=81=E8=AF=BB?= =?UTF-8?q?=E5=8F=96=E5=BD=93=E5=89=8D=E4=B8=BB=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/template.php b/library/think/template.php index 39770b1f..0085fe87 100644 --- a/library/think/template.php +++ b/library/think/template.php @@ -808,7 +808,7 @@ class Template private function parseTemplateFile($template) { if (false === strpos($template, '.')) { - return $this->config['tpl_path'] . $template . $this->config['tpl_suffix']; + return (defined('THEME_PATH') && substr_count($template, '/') < 2 ? THEME_PATH : $this->config['tpl_path']) . $template . $this->config['tpl_suffix']; } else { return $template; }