将DB_DEBUG设置为FALSE的数据库连接设置 [英] Database connection settings with DB_DEBUG set as FALSE
问题描述
我尝试连接到我的数据库,但我收到以下消息:
I'm trying to connect to my database but i get the following message:
无法使用提供的设置连接到数据库服务器。
Unable to connect to your database server using the provided settings.
文件名:core / Loader.php
Filename: core/Loader.php
行号:346
所以在阅读了很多,我发现在数据库连接中设置$ db ['default'] ['db_debug']为FALSE解决它。我做到了,错误消息消失了;网站的第一页加载太多,但没有数据库调用。从那时起,我开始在我的数据库调用期间收到错误,查询可能不返回查询对象。
So after reading a lot, I found that setting $db['default']['db_debug'] to FALSE in database connection solves it. I did that and the error message disappeared; the website's first page loaded too but it had no database calls. From then on I started getting errors during my database calls, the query were possibly not returning query objectts.
所以我想知道DB_DEBUG实际上解决了问题连接,只是屏蔽了DB连接错误不显示的问题?
So I want to know does DB_DEBUG actually solves the problem connection or it simply masks the problem that the DB connection errors do not show?
推荐答案
在应用程序>配置> database.php set
In Application > Config > database.php set
db['default'] = array(
..,
'db_debug' => FALSE,
..)
这篇关于将DB_DEBUG设置为FALSE的数据库连接设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!