l585826 发表于 2014-5-20 13:48:59

在视图中写的框架如何正确访问控制器的方法??

不加“/”是这个页面,
http://v1.freep.cn/3tb_140520133702ckys512293.png
加上“/”是这个正常的页面,
http://v1.freep.cn/3tb_1405201337024pks512293.png
下面是这个页面的HTML框架,它是通过访问fadmin控制器下的fadmin_top和fadmin_left方法合成页面的如果地址是这个:http://localhost/index.php/fadmin,链接就会错误,这个该如何解决???



<html>
<head>
<title>管理中心</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
</head>

<frameset rows="80,*"frameborder="NO" border="0" framespacing="0">
        <frame src="fadmin_top" noresize="noresize" frameborder="NO" name="topFrame" scrolling="no" marginwidth="0" marginheight="0" target="main" />

<frameset cols="230,*"rows="560,*" id="frame">
        <frame src="fadmin_left" name="leftFrame" noresize="noresize" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" target="main" />
        <frame src="" name="main" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" target="_self" />
</frameset>
<noframes>
<body> </body>
    </noframes>
</html>

sunboat 发表于 2014-5-20 13:53:31

链接地址用 site_url
src="<?php echo site_url('fadmin/fadmin_left');?>"

l585826 发表于 2014-5-20 13:58:37

sunboat 发表于 2014-5-20 13:53
链接地址用 site_url
src=""

谢谢,解决了!!
页: [1]
查看完整版本: 在视图中写的框架如何正确访问控制器的方法??