From 3c132d1ebd2389f284b2c55acb4a907a3f03bbc9 Mon Sep 17 00:00:00 2001 From: Anyon Date: Fri, 8 Jun 2018 10:25:52 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E4=BF=AE=E6=AD=A3=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/template.php | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/config/template.php b/config/template.php index 31cc384df..5b2fac1bd 100644 --- a/config/template.php +++ b/config/template.php @@ -18,21 +18,27 @@ $uriRoot = rtrim(preg_match('/\.php$/', $appRoot) ? dirname($appRoot) : $appRoot return [ // 模板引擎类型 支持 php think 支持扩展 - 'type' => 'Think', + 'type' => 'Think', // 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法 - 'auto_rule' => 1, + 'auto_rule' => 1, // 模板路径 - 'view_path' => '', + 'view_path' => '', // 模板后缀 - 'view_suffix' => 'html', + 'view_suffix' => 'html', // 模板文件名分隔符 - 'view_depr' => DIRECTORY_SEPARATOR, + 'view_depr' => DIRECTORY_SEPARATOR, // 模板引擎普通标签开始标记 - 'tpl_begin' => '{', + 'tpl_begin' => '{', // 模板引擎普通标签结束标记 - 'tpl_end' => '}', + 'tpl_end' => '}', // 标签库标签开始标记 - 'taglib_begin' => '{', + 'taglib_begin' => '{', // 标签库标签结束标记 - 'taglib_end' => '}', + 'taglib_end' => '}', + // 定义模板替换字符串 + 'tpl_replace_string' => [ + '__APP__' => $appRoot, + '__ROOT__' => $uriRoot, + '__STATIC__' => $uriRoot . "/static", + ], ];