用户
 找回密码
 入住 CI 中国社区
搜索
12
返回列表 发新帖
楼主: test100
收起左侧

[HELP] Ci 控制器不能加载两个 模型

  [复制链接]
发表于 2010-3-9 11:24:36 | 显示全部楼层
非常行,注意加载时的大小写
发表于 2010-3-22 15:07:52 | 显示全部楼层
楼主的贴里有N多错字。。。 编码里肯定也是因为打错了字母或者大小写问题引起的。 请检查。
发表于 2012-5-5 11:24:51 | 显示全部楼层
我的也不能加载  为什么呢???
PHP复制代码
 
/**
                * 构造方法
                */

        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
发表于 2013-10-14 15:49:15 | 显示全部楼层
function __construct(){
        parent::Controller();
        $this->load->model('m_socket','Socket');
        $this->load->model('m_client','Client');
    }

父类里有  Controller 这个方法吗?
发表于 2013-10-14 16:05:28 | 显示全部楼层
加载类时候的别名错了吧 是不是和控制同样的名称了

本版积分规则