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

[讨论/交流] CI框架下Loader找不到模型

[复制链接]
发表于 2016-1-26 21:34:06 | 显示全部楼层 |阅读模式
本帖最后由 zhangader 于 2016-1-26 22:07 编辑

CI框架中,我在Models目录下建立了 一个Model文件user_model.php,文件名小写,类名第一个字母大写User_model,loader报错提示找不到模型


A PHP Error was encounteredSeverity: Warning
Message:  Cannot modify header information - headers already sent by (output started at /home/p489/public_html/58222cnn.cn/application/core/MY_Controller.php:2)
Filename: core/Common.php
Line Number: 568
Backtrace:

An uncaught Exception was encounteredType: RuntimeException
Message: Unable to locate the model you have specified: User_model
Filename: /home/p489/public_html/58222cnn.cn/system/core/Loader.php
Line Number: 314
Backtrace:
                        File: /home/p489/public_html/58222cnn.cn/application/controllers/User.php
                        Line: 5
                        Function: model       
                        File: /home/p489/public_html/58222cnn.cn/index.php
                        Line: 292
                        Function: require_once                       


 楼主| 发表于 2016-1-26 21:56:51 | 显示全部楼层


A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/p489/public_html/58222cnn.cn/application/core/MY_Controller.php:2)

Filename: core/Common.php

Line Number: 568

Backtrace:


An uncaught Exception was encountered

Type: RuntimeException

Message: Unable to locate the model you have specified: User_model

Filename: /home/p489/public_html/58222cnn.cn/system/core/Loader.php

Line Number: 314

Backtrace:

File: /home/p489/public_html/58222cnn.cn/application/controllers/User.php
Line: 5
Function: model

File: /home/p489/public_html/58222cnn.cn/index.php
Line: 292
Function: require_once

本版积分规则