Blog

How to hide database debug errors in CodeIgniter

Posted by : Leo T Abraham on 25 July, 2013

There is a simple method to hide database errors in CodeIgniter. If such errors are diplayed, it may reveal the table name, field name etc of your database, which cause threat to your security. In order to hide such errors:
1)  Go to ROOT FOLDER/application/config/database.php
2)  Change $db['default']['db_debug'] = TRUE; to $db['default']['db_debug'] = FALSE;

user image
Craig
It was really helpful. Thanks.