CodeIgniter: Can't load database from within a model

后端 未结 2 536
花落未央
花落未央 2021-01-22 02:50

I\'ve written a new model for my CodeIgniter framework. I\'m trying to load the database from within the constructor function, but I\'m getting the following error:



        
2条回答
  •  梦毁少年i
    2021-01-22 03:24

    I'm not sure if it would cause a problem or not, but Model names are supposed to have the first letter capitalized. http://ellislab.com/codeigniter/user-guide/general/models.html Jens is also correct that you need to call the parent constructor as well.

提交回复
热议问题