haohailuo 发表于 2010-3-9 11:24:36

非常行,注意加载时的大小写

avinmo 发表于 2010-3-22 15:07:52

楼主的贴里有N多错字。。。 编码里肯定也是因为打错了字母或者大小写问题引起的。 请检查。

sola 发表于 2012-5-5 11:24:51

我的也不能加载为什么呢???

/**
                * 构造方法
                */
      function __construct(){
              parent::__construct();
                        $this->session->userdata['user_id']!='' ? : redirect('login');
                        $this->load->model('video_model','video');
                        $this->load->model('user_model','user',true);
      }
private function _getUserById($uid){
                        $result = $this->user->userById($uid);
                        //file_put_contents('result.txt', var_export($result,true));
                        //exit();
                }





A PHP Error was encountered

Severity: Notice

Message: Undefined property: Video::$user

Filename: controllers/video.php

Line Number: 47

cowa 发表于 2013-10-14 15:49:15

function __construct(){
      parent::Controller();
      $this->load->model('m_socket','Socket');
      $this->load->model('m_client','Client');
    }

父类里有Controller 这个方法吗?

IvanCI 发表于 2013-10-14 16:05:28

加载类时候的别名错了吧 是不是和控制同样的名称了
页: 1 [2]
查看完整版本: Ci 控制器不能加载两个 模型