From 61397cb1e4ad1accb523c6067b11fdcb73ed5442 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 23 May 2016 16:41:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9Btemplate=E7=B1=BB=E5=AF=B9?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E6=96=87=E4=BB=B6=E7=9A=84=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Template.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/think/Template.php b/library/think/Template.php index 844448f4..e5430707 100644 --- a/library/think/Template.php +++ b/library/think/Template.php @@ -1049,7 +1049,7 @@ class Template */ private function parseTemplateFile($template) { - if (false === strpos($template, '.')) { + if ('' == pathinfo($template, PATHINFO_EXTENSION)) { if (strpos($template, '@')) { // 跨模块调用模板 $template = str_replace(['/', ':'], $this->config['view_depr'], $template); @@ -1060,6 +1060,7 @@ class Template } $template .= '.' . ltrim($this->config['view_suffix'], '.'); } + if (is_file($template)) { // 记录模板文件的更新时间 $this->includeFile[$template] = filemtime($template);