tp6使用layout模板

文章描述:

thinkphp6使用layout模板

 

1、配置config/view.php

'layout_on'     => true,
'layout_name'   => 'public/layout'

2、layout.html模块

{include file="public/header" /}
<div class="content-wrapper">
    {__CONTENT__}
</div>
{include file="public/footer" /}

3、不继承使用layout

View::config(['layout_on' => false]);

 

发布时间:2022/04/24

发表评论