woshilifei 发表于 2012-2-18 15:27:00

新手,做‘一哈子’的新闻系统遇到的小问题

代码是这样的
<?php

class Home extends Controller {
        function __construct()
       
        {
          parent::Controller();
          $this->load->helper('url');
                  }
    function index()
    {
          $data['page_title'] = 'CI开发新闻发布系统';
          $this->load->view('header',$data);
          $this->load->view('index');
          $this->load->view('footer');
          
    }
}

也在view文件夹里创建了header.php   index.phpfooter.php 浏览时的问题是
Fatal error: Class 'Controller' not found in D:\xampp\htdocs\ci\application\controllers\home.php on line 3

不知道问题出在哪里?

woshilifei 发表于 2012-2-18 15:38:45

自己解决了,原来我用的2.0以上的版本的问题
页: [1]
查看完整版本: 新手,做‘一哈子’的新闻系统遇到的小问题