Home > Backend Development > PHP Tutorial > codeigniter 如何载入model类

codeigniter 如何载入model类

WBOY
Release: 2016-06-13 13:50:12
Original
1258 people have browsed it

codeigniter 怎么载入model类?
我必须这么写
class Indexwelcome extends Controller {
function __construct()
{
parent::Controller();
$this->load->model('Mtest','',TRUE);

}
但是我看到别人这么写
$this->load->model('Mtest');

如果我后面不加,'',TURE,就会报错,请问为什么啊


------解决方案--------------------
不会吧?一直都是这么用的!没有什么错误啊!
你的Model是怎么声明的不?
class newModel extends Model {
function newModel(){
parent::Model();
}
}

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template