获取渲染好的模版HTML内容:
非完整示例,以下是获取渲染好的模版HTML的关键代码
//$template 模版路径
//$code 默认200
//$vars 模板变量
$tpl_content = Response::create($template, 'view', $code)->assign($vars)->getContent();
echo $tpl_content;
推荐一个thinkphp8通用后台系统 http://www.xnadmin.cn
非完整示例,以下是获取渲染好的模版HTML的关键代码
//$template 模版路径
//$code 默认200
//$vars 模板变量
$tpl_content = Response::create($template, 'view', $code)->assign($vars)->getContent();
echo $tpl_content;
推荐一个thinkphp8通用后台系统 http://www.xnadmin.cn