采用了官网文档第一种全局设置。
1.config文件设置
//布局模板
'layout_on' => true,
'layout_name' => 'layout',
'layout_item' => '{__CONTENT__}'
2.layout.html内容
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<!--[if IE 8 ]><html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" class="ie8"><![endif]-->
<!--[if IE 9 ]><html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" class="ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html>
<!--<![endif]-->
<head>
<me
<me
<me
<ti
<sc
<li
<sc
<li
</head>
<body>
{include file="public/header" /}
{__CONTENT__}
{include file="public/footer" /}
</body>
</html>
3.view目录
public
-header.html
-footer.html
layout.html
最佳答案