How to hide database error? |
[eluser]murtuza54[/eluser]
Hi I want to hide any database error like 1064 or 1054 exa : Code: A Database Error Occurred as we know it shows defected query with table name and fields. Is there any way to redirect that page to some other decorative error page? I dont want to show any kind of database table name or error on site?
[eluser]janogarcia[/eluser]
Hi, Set db_debug to FALSE in application/config/database.php Code: $db['default']['db_debug'] = FALSE; More info in the Database configuration documentation.
[eluser]murtuza54[/eluser]
Thank you very much. Its stops displaying database errors. but can we redirect this to some other page?
[eluser]murtuza54[/eluser]
I got answer for that. In application/errors, there are all error files. i have put redirection code in each file to my custom error page. this way it works. other way is we can modify existing error pages also the way we like. Thank you. |
Welcome Guest, Not a member yet? Register Sign In |