|
加载数据库类,我是使用自动加载
模型中我使用了var_dump打印$this对象,输出的结果如下
object(Article_model)#17 (2) {
["total":"Article_model":private]=>
NULL
["number":"Article_model":private]=>
int(1)
}
调用$this->db->query();报如下错误,真的是欲哭无泪啊!!!
Fatal error: Call to a member function query() on a non-object in D:\PHP\php-5.5.10\www\wp\application\models\article_model.php on line 34 |
|