| 
 | 
 
 本帖最后由 max51888 于 2012-12-30 22:41 编辑  
 
样式文件都是建立在根目录下面:style/banner.css 
 
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 
 
class Home extends CI_Controller{ 
    function __construct()  
    { 
        parent::__construct(); 
 
    } 
    function index(){ 
        $this->load->view('header'); 
        $this->load->view('index'); 
        $this->load->view('footer'); 
        } 
    function category(){ 
        $this->load->view('header'); 
        $this->load->view('category'); 
        $this->load->view('footer'); 
    } 
} 
?> 
 
 
header.php的文件 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<html xmlns:wb=“http://open.weibo.com/wb”> 
<head> 
 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <title><?=$page_title;?></title> 
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> 
    <link href="style/banner.css" rel="stylesheet" type="text/css" /> 
</head> 
通过http://localhost/qingpai/index.php/category 无法正常加载到css文件,不知道为什么哪位高手帮忙一下,谢谢了。 
 
 
 
 |   
 
 
 
 |