浏览模式: 标准 | 列表2008年08月的文章

codeigniter里管理页面框架的使用

控制器代码:

PHP代码
  1. class Admin extents Control  
  2. {  
  3.     function index() {  
  4.         $this->load->view('admin/index');  
  5.     }  
  6.     function top() {  
  7.         $this->load->view('admin/top');  
  8.     }  
  9.     function menu() {  
  10.         $this->load->view('admin/menu');  
  11.     }  
  12.     function main() {  
  13.         $this->load->view('admin/main');  
  14.     }  
  15.     function bottom() {  
  16.         $this->load->view('admin/bottom');  
  17.     }  
  18. }  

views文件夹下有个专门的admin文件夹,里面都是管理页面(index.php , top.php , menu.php , main.php , bottom.php)

index.php内容如下:

 

XML/HTML代码
  1. <html><head><title> Administrator’s control panel</title>
  2. </head>  
  3. <frameset rows="60,*,27" frameborder="no" border="0" framespacing="0">  
  4.   <frame src="<?php echo site_url("Admin/top") ?>" name="topFrame" scrolling="no">  
  5.   <frameset rows="*" cols="0,*" name="ecc" framespacing="0" frameborder="no" border="0">  
  6.     <frame src="<?php echo site_url("Admin/menu") ?>" name="mainFrame" border="0" scrolling="no">  
  7.     <frame src="<?php echo site_url("Admin/main") ?>" name="rightFrame" scrolling="auto">  
  8.   </frameset>  
  9.   <frame src="<?php echo site_url("Admin/bottom") ?>" name="bottomFrame" scrolling="no">  
  10. </frameset>  
  11. </html>  

 

Tags: codeigniter