thinkphp模版包含问题

LeoGeorge 2012-06-07 01:26:43
IndexAction.class.php控制器代码:

<?php
class IndexAction extends Action{
function index(){
$this->display();

}

}

?>

模版目录如下:
tpl目录
default目录
index目录
index.html //index目录下面的index.html模版
public目录
header.html
footer.html
我在index/index.html下面使用了分帧结构:

<frameset rows="50%,*">
<frame src="__ROOT__/admin.php/Public/header"/>
<frame src="__ROOT__/admin.php/Public/footer"/>
</frameset>

无论怎样都不能显示不了header.html和footer.html的内容啊,求解
...全文
247 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
xuzuning 2012-06-07
  • 打赏
  • 举报
回复
当然不能,每个框架都是一个独立的页面
虽然你可以用同一个程序来处理,但处理时还是分开的

不能是因为框架,就连规矩都不讲了
LeoGeorge 2012-06-07
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 的回复:]

对应 header 和 footer 的控制器代码呢?
[/Quote]我明白了,一言惊醒梦中人啊,谢谢你了,缺少了public控制器,纠结了好久呢
LeoGeorge 2012-06-07
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 的回复:]

对应 header 和 footer 的控制器代码呢?
[/Quote]header和footer放在public里面啊,不能直接在index.html里面包含这两个模版吗?
xuzuning 2012-06-07
  • 打赏
  • 举报
回复
对应 header 和 footer 的控制器代码呢?

4,250

社区成员

发帖
与我相关
我的任务
社区描述
国内外优秀PHP框架讨论学习
社区管理员
  • Framework
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧