Reputation: 666
How can replace error pages like
A Database Error Occurred
Error Number: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by rand()' at line 1
with my website's default 404 error page?
Upvotes: 8
Views: 22602
Reputation: 16062
You can force 404 with the method
show_404();
This will show 404 when u want it. In your case just catch your error and use this function.
Or you can set custom error handler, log it and display 404, thought i wouldn't recommend doing that.
Upvotes: 18