From de5e3ff191af4f671a525f77c91f687e8fb8a2d7 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Thu, 28 Mar 2013 21:47:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BTemplate=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Think/Template.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Think/Template.php b/Think/Template.php index d99c3304..a40b3ca4 100644 --- a/Think/Template.php +++ b/Think/Template.php @@ -28,7 +28,7 @@ class Template { 'tpl_end' => '}', // 模板引擎普通标签结束标记 'strip_space' => false, // 是否去除模板文件里面的html空格与换行 'tpl_cache' => true, // 是否开启模板编译缓存,设为false则每次都会重新编译 - 'cache_type' => 'file', + 'compile_type' => 'file', 'cache_path' => '', 'cache_prefix' => '', // 模板缓存前缀标识,可以动态改变 'cache_time' => 0, // 模板缓存有效期 0 为永久,(以数字为值,单位:秒) @@ -59,7 +59,8 @@ class Template { $this->config['tpl_end'] = $this->stripPreg($this->config['tpl_end']); // 初始化模板编译存储器 - $class = '\Think\Template\Driver\\'.$this->config['compile_type']; + $type = $this->config['compile_type']?$this->config['compile_type']:'File'; + $class = '\Think\Template\Driver\\'.ucwords($type); $this->storage = new $class(); }