用户
 找回密码
 入住 CI 中国社区
搜索
查看: 5293|回复: 13
收起左侧

[已解决] frame页面放在view是空白,放在controllers里才显示,在线等

[复制链接]
发表于 2011-3-30 04:34:39 | 显示全部楼层 |阅读模式
本帖最后由 shanke521099 于 2011-3-30 21:17 编辑

如题
这是为什么?(求教了。)
发表于 2011-3-30 09:28:30 | 显示全部楼层
把代码放上来看看哈
发表于 2011-3-30 11:21:39 | 显示全部楼层
肯定是你使用不当造成的,发上代码瞧一瞧
发表于 2011-3-30 11:27:15 | 显示全部楼层
你不会是掉错页面了吧.......
 楼主| 发表于 2011-3-30 20:32:20 | 显示全部楼层
PHP复制代码
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
</head>
<frameset rows="59,*" cols="*" frameborder="no" border="0" framespacing="0">
  <frame src="top" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />
  <frameset cols="213,*" frameborder="no" border="0" framespacing="0">
    <frame src="menu" name="leftFrame" scrolling="No" noresize="noresize" id="leftFrame" title="leftFrame" />
    <frame src="main" name="mainFrame" id="mainFrame" title="mainFrame" />
  </frameset>
</frameset>
<noframes><body>
</body>
</noframes></html>
 
复制代码
 楼主| 发表于 2011-3-30 20:34:16 | 显示全部楼层
shanke521099 发表于 2011-3-30 20:32



   
PHP复制代码
<?
class Top extends CI_Controller {
function __construct()
{
  parent::__construct();
        $this->load->helper('url');
}
 
  function index()
    {    
       
     $this->load->view('top_view');
 
    }
   
?>
复制代码
 楼主| 发表于 2011-3-30 20:38:47 | 显示全部楼层
页面一片空白,
查看页面的源文件如下

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
</head>

<frameset rows="59,*" cols="*" frameborder="no" border="0" framespacing="0">
  <frame src="index.php/top" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />
  <frameset cols="213,*" frameborder="no" border="0" framespacing="0">
    <frame src="index.php/menu" name="leftFrame" scrolling="No" noresize="noresize" id="leftFrame" title="leftFrame" />
    <frame src="index.php/main" name="mainFrame" id="mainFrame" title="mainFrame" />
  </frameset>
</frameset>
<noframes>
发表于 2011-3-30 22:51:48 | 显示全部楼层
src="" 请使用绝对 URL,这个讨论过很多次了。
发表于 2011-3-31 14:04:09 | 显示全部楼层
body的位置让人很费解
发表于 2011-4-1 00:08:21 | 显示全部楼层
hex已经回答,路径写绝对的。。body不费解,
<noframes><body>
</body>
</noframes>  
这里的是告诉浏览器如果不支持frames,则显示<body></body>。

本版积分规则