From 785172460d18065aa587b952b9343540aa0eddbb Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 27 Jan 2016 11:05:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0V=E5=8A=A9=E6=89=8B=E5=87=BD?= =?UTF-8?q?=E6=95=B0=20=E7=94=A8=E4=BA=8E=E6=B8=B2=E6=9F=93=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E5=92=8C=E5=8F=98=E9=87=8F=E8=B5=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- helper.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/helper.php b/helper.php index 7f7df84d..97e6d6d3 100644 --- a/helper.php +++ b/helper.php @@ -281,3 +281,14 @@ function trace($log = '[think]', $level = 'log') \think\Log::record($log, $level); } } + +/** + * 渲染模板输出 + * @param string $template 模板文件 + * @param array $vars 模板变量 + * @return string + */ +function V($template, $vars) +{ + return \think\View::instance(Config::get())->fetch($template, $vars); +}