php – 强制CodeIgniter显示404页面而不是像1064这样的任何其他
发布时间:2020-12-13 18:24:59 所属栏目:PHP教程 来源:网络整理
导读:如何替换错误页面 A Database Error OccurredError Number: 1064You 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 与我的网站的默认4
如何替换错误页面
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 与我的网站的默认404错误页面?
您可以使用该方法强制404
show_404(); 当你想要它时,这将显示404.在您的情况下,只是捕获您的错误并使用此功能. 或者您可以设置自定义错误处理程序,记录它并显示404,我想不建议这样做. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |