PHP: 500 Error to error page

前端 未结 1 1410
再見小時候
再見小時候 2020-12-04 03:27

As a prelude, I know what a HTTP 500 is, and I know how to fix them.

On PHP 5.3, i\'m running a production environment with show_errors off. When there are any fata

相关标签:
1条回答
  • 2020-12-04 04:05

    Fatal errors don't produce 500 errors in and of themselves, they would return 200 with blank page typically (if no output had been flushed to browser at the point of the error) . Plus this will not help you anyway, as Apache would be no longer involved when PHP is having the error.

    Maybe you could register a shutdown function to send 500 header (to get 500 result) and display the content you want to display.

    0 讨论(0)
提交回复
热议问题