-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 时,页头及导航菜单 也能正常显示的
不知俺说的明白不,不知问题出在哪了
最佳答案