自定义在PHP 500错误页面 [英] Customise the 500 Error page in php
问题描述
我在codeigniter我的网站,code,其中我在融合使用php.There图像Imagick有很多,可以生成 500 HTTP错误功能
。我要求我创建一般的浏览器的500错误页面,而不是定制的500错误页面。
I have my website code in codeigniter wherein I am fusing images using Imagick in php.There are a lot of functions which can generate the 500 HTTP error
.I require a customised 500 error page that I create instead of the general browser 500 error page.
我已阅读,使用的ErrorDocument 500 error_doc / 500.html
在的.htaccess
将没有帮助Apache的递了给PHP。但我也需要一个通用的解决方案泛网站,会自动检查500和显示所需的custon页。
I have read that using the ErrorDocument 500 error_doc/500.html
in .htaccess
won't help as the Apache has handed of to PHP. But I also need a general solution pan-website which should automatically check for 500 and display the required custon page.
推荐答案
创建一个名为 500.shtml
文件,并将其上传到public_html或任何你的根目录下上传的。使用500.shtml文件创建一个500内部服务器错误自定义页面。
Create a file called 500.shtml
and upload it to public_html or whatever your root uploading directory is. Use the 500.shtml file to create a 500 Internal Server Error custom page.
这篇关于自定义在PHP 500错误页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!