discuz!模板引擎执行流程
模板引擎是通过一个函数调用的,路径是:/source/function/function_core.php
在以上php文件中搜索:function template,就可以找到模板引擎的总入口
php混编代码的位置:/data/template/这个里面的php文件都是模板缓存文件。
这些模板缓存文件可以删除,刷新以后又可以自动生成。/data/template/这个文件夹要可写。
理解php的include机制: <!-- 头部文件: --> <!DOCTYPE html!>
<html>
<head>
<meta charset="utf-8">
</head>
</html>
<body>
<!-- 主文件: -->
<?php include 'head.php' ?>
<p>这里是内容</p>
<?php include 'foot.php' ?>
<!-- 尾部文件: -->
</body>
</html>
|