CI view中怎样包含头部页面
新手初学做一个页面,因为头部页面是一样的所以想别的页面都包含它而不用再写。。<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><head><title></title>
<link href="CSS/style.css" rel="stylesheet">
</head>
<table width="900" height="598" align="center" bordercolor="#CCCCCC">
<tr>
<td height="89" colspan="3"><strong>
<?php include("top.php")?>
</strong></td>
</tr>
代码如上,PHP中是这样包含的,但是在CI中不知道怎么做,不想用frame的方法,还有别的办法吗,大神们求救~!
还是写一下吧。感觉好点。呵呵。或者改改load view 先读header文件? <?php view('header');?> <?=$this->load->view('header');?> ljc 发表于 2013-12-27 16:43
这个是在控制器中写,还是在视图中写? Dis_y 发表于 2016-2-17 11:09
这个是在控制器中写,还是在视图中写?
视图中 不要include,写成<?php $this->load->view('top');?> CI中不能这样使用的只是一个框架哦$this->load->view('top')
页:
[1]