htaccess压制php错误

时间:2012-06-17 08:54:43

标签: php linux

我有这个代码来抑制所有错误。当出现错误时出现空白页面,如何用自定义页面替换此空白页面?

php_flag  log_errors on
php_value error_log  PHPerrors.log

## prevent access to PHP error log ##
<Files PHPerrors.log>
 Order allow,deny
 Deny from all
 Satisfy All
</Files>

## supress php errors ##
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off

1 个答案:

答案 0 :(得分:2)

您应该为500错误定义文件:

ErrorDocument 500 ./errors/500.html
相关问题