English 中文(简体)
处理密码用户中的PHP错误
原标题:Handling PHP errors in Codeigniter

I accidentally pushed a bad piece of code yesterday. My site was down for the entire day. Embarrassing, yes. The worst part was that my customers had no way of contacting me to tell me it was down.

我可以看一看密码用户的习惯错误页,这些代码错误为:application/errors/error_general.php

我认为,可能需要在阿帕奇一级这样做。 I ve Trial putting ErrorDocument 500 /error.html in the base chainers .htacess file. 这只了不起作用。

基本上,我喜欢用一种方法,来生成一个客户错误的网页,用于处理代号错误。 任何建议?

问题回答

如果你看<代码>、系统/核心/编码Igniter.php#63,然后看system/core/Common.php#450,然后看<代码> 系统/核心/Exceptions.php#149,你将注意到错误手稿页为application/errors/error_php.php>。 请注意,该模板无法处理一些致命的错误(link)。

The following error types cannot be handled with a user defined function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, and most of E_STRICT raised in the file where set_error_handler() is called

实际上,我是这样说的。 这需要在法典根基的“htaccess”档案中进行。

查阅档案

ErrorDocument 500 /errors/500.htm




相关问题
Using SimplePie with CodeIgniter and XAMPP

I am using CodeIgniter 1.7.2 with XAMPP 1.7.2 on a Windows computer. I am trying to make use of SimplePie. I followed all the instructions I could find: a copy of simplepie.inc is in my applications/...

Multiple Sites with common files

I have developed over 50 sites that all use the exact same files other than CSS and IMAGES, I currently duplicate the files each time I create a new site and upload different css and images. What ...

http server validation

I finish a litle http server, writing from scratch. I would like to be sure that my imlementation is conforme to the HTTP specifications. W3C give us tools for HTML/XML conformance, but i see nothing ...