致命错误:调用未定义的方法CI_DB_mysql_driver ::其中() [英] Fatal error: Call to undefined method CI_DB_mysql_driver::where()

查看:2052
本文介绍了致命错误:调用未定义的方法CI_DB_mysql_driver ::其中()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚升级我的版本的codeIgniter ......我经历了配置文件和复制的都不在我现有的配置,但在里面的新的配置文件中的任何值。我运行到哪里活动记录不工作的错误,我不确定为什么。我试图调试和跟踪回内code的一个问题,但我在努力。什么我应该做的任何想法?我的错误是

I just upgraded my version of CodeIgniter... I went through the config files and copied over any values that weren't in my existing configuration but were inside the new config files. I'm running into an error where Active Record isn't working and I'm unsure why. I'm trying to debug and trace it back to a problem within the code but am struggling. Any ideas on what I should do? My error is

Fatal error: Call to undefined method CI_DB_mysql_driver::where() in /scripts/htdocs/smartdox-libraries/smartdox/system/libraries/Session.php on line 201

CI的自己的会话类是尝试使用此功能。

CI's own session class is trying to use this function.

的config / database.php中

$active_group = "default";
$active_record = TRUE;

$db['default']['hostname'] = CPOD_DATABASE_SERVER;
$db['default']['username'] = CPOD_DATABASE_USER;
$db['default']['password'] = CPOD_DATABASE_PASSWORD;
$db['default']['database'] = CPOD_DATABASE;
$db['default']['dbdriver'] = "mysql";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = FALSE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";

在它看起来就像加载到CI的图书馆自动加载一个数据库对象的初步调查导致装入 $ active_record 价值拉动虚假一个数据库对象。

After initial investigation it looks like having a "database" object loaded into CI's library auto load causes a DB object loaded with the $active_record value pulling in false.

推荐答案

你的DataMapper的引导程序添加到您的index.php文件的底部?这个固定我的问题。

Did you add the datamapper bootstrap to the bottom of your index.php file? This fixed my problem.

请参阅9点安装页面上: http://datamapper.wanwizard.eu/pages/installation.html

See point 9 on the installation page: http://datamapper.wanwizard.eu/pages/installation.html

这篇关于致命错误:调用未定义的方法CI_DB_mysql_driver ::其中()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆