天使漫步IT工作室天使漫步IT工作室

ci - Undefined property: XXX::$db 解决办法


Warning: count(): Parameter must be an array or an object that implements Countable in /www/wwwroot/u11u.com/usr/themes/wq/functions.php on line 110

Warning: count(): Parameter must be an array or an object that implements Countable in /www/wwwroot/u11u.com/usr/themes/wq/functions.php on line 116
A PHP Error was encountered
Severity: Notice

Message: Undefined property: XXX::$db

Filename: core/Model.php

在Model类中无法使用db这个对象,出现这个问题的原因是没有自动加载database,

在autoload.php 中的 libraries 配置下 database即可解决。

例如:

$autoload['libraries'] = array('database');

本站原创,欢迎转载,转载敬请标明出处:天使漫步IT工作室 » ci - Undefined property: XXX::$db 解决办法
仅有 1 条评论
  1. 文章不错支持一下吧

添加新评论


Warning: Use of undefined constant php - assumed 'php' (this will throw an Error in a future version of PHP) in /www/wwwroot/u11u.com/usr/themes/wq/comments.php on line 38