thinkphp 加载静态框架frameset frame 浏览器显示空白

我觉得静态框架这个东西非常奇怪,可能是因为没有研究透它。

我的情况是这样的,我之前做过的一个面向对象没有基于thinkPHP,的项目中用同一套后台静态框架没有问题,但用thinkphp后台的index也显示为空白。修改前我的index.html页面是这样的:

<HTML>
<HEAD>
<TITLE>管理中心 V1.0</TITLE>
        <META http-equiv=Content-Type content="text/html; charset=utf-8">
        <META http-equiv=Pragma content=no-cache>
        <META http-equiv=Cache-Control content=no-cache>
        <META http-equiv=Expires content=-1000>
        <LINK href="__ROOT__/admin/Tpl/css/admin.css" type="text/css" rel="stylesheet">
</HEAD>

        <FRAMESET border=0 frameSpacing=0 rows="60, *" frameborder="0">
        <FRAME name=header src="__APP__?m=Public&a=head" frameBorder=0 noResize scrolling=no>
        <FRAMESET cols="170, *">
        <FRAME name=menu src="__APP__?m=Public&a=menu" frameBorder=0 noResize>
        <FRAME name=main src="__App__?m=Public&a=main" frameBorder=0 noResize scrolling=yes>
        </FRAMESET>
        </FRAMESET>
<noframes>
</noframes>
</HTML>

 这样,单独访问menu  和  main  和 head  都没有问题,单就是index页不可以

改成这样

<HTML>
<HEAD>
        <TITLE>管理中心 V1.0</TITLE>
        <META http-equiv=Content-Type content="text/html; charset=utf-8">
        <META http-equiv=Pragma content=no-cache>
        <META http-equiv=Cache-Control content=no-cache>
        <META http-equiv=Expires content=-1000>
        <LINK href="__ROOT__/admin/Tpl/css/admin.css" type="text/css" rel="stylesheet">
</HEAD>
      
        <frameset border=0 frameSpacing=0 rows="60, *" frameborder="0">
              <iframe name=header src="__APP__?m=Public&a=head" frameBorder=0 noResize scrolling=no style="100%;height:60px;"></iframe>
              <frameset cols="170, *">
                    <iframe name=menu src="__APP__?m=Public&a=menu" frameBorder=0 noResize scrolling=no style="height:100%;13%"></iframe>
                    <iframe name=main src="__APP__?m=Public&a=main" frameBorder=0 noResize scrolling=yes style="height:100%;86.5%;"></iframe>
              </frameset>
        </frameset>
<noframes>
</noframes>
</HTML>

这样基本上就没问题,,至于原因还有待研究。。

原文地址:https://www.cnblogs.com/xiaoyueer/p/3478210.html