用户
 找回密码
 入住 CI 中国社区
搜索
查看: 2220|回复: 2
收起左侧

[已解决] 模型调用问题

[复制链接]
发表于 2010-8-27 14:47:41 | 显示全部楼层 |阅读模式
$this -> load ->model('M_customer_search');
  $data['query_search_route']=$this->M_customer_search->search_route($r_id);

$this -> load ->model('m_customer_search');
  $data['query_search_route']=$this->m_customer_search->search_route($r_id);
这两个是没有问题的!

$this -> load ->model('M_customer_search');
  $data['query_search_route']=$this->m_customer_search->search_route($r_id);

$this -> load ->model('m_customer_search');
  $data['query_search_route']=$this->M_customer_search->search_route($r_id);
这两个有问题!
谁能把问题说清楚?
发表于 2010-8-27 16:35:16 | 显示全部楼层
一句话:CI 各个部分大小写命名都是有规定的,不严格遵守就出错。
参考 http://codeigniter.org.cn/user_guide/general/models.html
发表于 2010-8-27 16:49:24 | 显示全部楼层
建议首字母全部小写,大小写混着来很容易出错,我上回就出现过大小写的问题,解决了好久,原来首字母大写了

本版积分规则