php是如何调用模板文件的

新手,下了个php源码看,但看不懂,看他的主页index.php中只有一个<?php、、、、、?>脚本,没看到有htm代码,可它是怎么生成的呢?源码里有个模板文件,但我不... 新手,下了个php源码看,但看不懂,看他的主页index.php中只有一个<?php 、、、、、?>脚本,没看到有htm代码,可它是怎么生成的呢?源码里有个模板文件,但我不知道在index。php是怎么调用模板的?
求解
index.php源码
((<?php
define('IN_PHPMPS', true);
require dirname(__FILE__) . '/include/common.php';

$count = $db->getOneCached("select count(*) from {$table}info where is_check=1");
$today_count = $db->getOneCached("select count(*) from {$table}info where is_check=1 and postdate>".mktime(0,0,0));
$sql = "select catid,count(*) as num from {$table}info where is_check=1 group by catid ";
$counts = $db->getAllCached($sql);
$info_count = array();
foreach($counts as $k=>$v) { $info_count[$v['catid']] = $v['num']; }

$flash = get_flash();//焦点图
$fac = get_fac('20');//便民信息
$links = get_link_list();//友情链接
$helps = get_index_help('5');//首页帮助
$coms = get_index_com('7');//首页黄叶

$articles = get_index_article('7');//文章
$comments = get_new_comment('6');//最新评论信息
$new_info = get_info('','','10','','date','10');//最新信息
$pro_info = get_info('','','10','pro','','10');//推荐信息
$hot_info = get_info('','','10','','click', '10', '','m-d');//热门信息
$thumb_info = get_info('','','7','','date','9','1');//图片信息

$seo['title'] = $CFG['webname'];
$seo['keywords'] = $CFG['keywords'];
$seo['description'] = $CFG['description'];

include template('index');
?>
))
展开
 我来答
kybetter
推荐于2018-05-15 · TA获得超过237个赞
知道小有建树答主
回答量:245
采纳率:0%
帮助的人:102万
展开全部
你好,在代码的最后一行,这句代码include template('index');就调用了模板,里面的模板名称是index.
wo习惯了恋你
2013-05-17 · TA获得超过352个赞
知道答主
回答量:52
采纳率:0%
帮助的人:61.5万
展开全部
include template('index'); 这行是
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
玩力度
2013-05-17
知道答主
回答量:39
采纳率:0%
帮助的人:22.7万
展开全部
include template('index'); 这句就是调用模板。
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
JovenShao
2013-05-17 · TA获得超过514个赞
知道小有建树答主
回答量:1161
采纳率:80%
帮助的人:634万
展开全部
具体请看template函数
追问
在那个文件里查看template这个函数
追答
全站搜索就是了
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 1条折叠回答
收起 更多回答(2)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式