mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 23:52:49 +08:00
增加V助手函数 用于渲染模板和变量赋值
This commit is contained in:
11
helper.php
11
helper.php
@@ -281,3 +281,14 @@ function trace($log = '[think]', $level = 'log')
|
|||||||
\think\Log::record($log, $level);
|
\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);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user