【求助】模板页头、页脚引用 不显示的问题

浏览:1280 发布日期:2015/10/07 分类:求助交流 关键字: include 文件引用
模板文件分布的大致情况如下:
-View
---Index
------index.html
代码情况:

<include file="Public/head" />
内容部分
<include file="Public/foot" />

---Public
------head.html
------foot.html

-Controller
---CommonController.class.php 初始化相关 “获取 页头导航菜单的 相关SQL 代码”
---IndexController.class.php
---PublicController.class.php
代码情况:

public function head(){ …… }
public function foot(){ …… }


现在的问题是:
1、我在 CommonController.class.php 中 编写 “获取 页头导航菜单的 相关SQL 代码”,则 index.html 页头及导航菜单可以正常显示。
2、如果我在 PublicController.class.php 中 编写 “获取 页头导航菜单的 相关SQL 代码”,则 index.html 页头 虽然显示出来了,但是 导航菜单却没显示出来,但是 地址栏中直接访问 /index.php/Home/Public/head 时,页头及导航菜单 也能正常显示的



不知俺说的明白不,不知问题出在哪了
最佳答案
评论( 相关
后面还有条评论,点击查看>>