CodeIgniter Forums

Full Version: How to use error views in codeigniter.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

With Codeigniter 3, new folders come, application/errors and views/errors.

In this moment, when I have a database error a message like "A Database Error Occurred" is shown.

How can I disable this kind of messages and show 404 page, etc...

Are these new folders for doing it?

Thanks for your help.
The database error message will generally be displayed using views/errors/html/error_db.php (or views/errors/cli/error_db.php if you're using the CLI). You can disable DB error messages by setting db_debug to false in your database config.