PHP production server - turn on error messages

后端 未结 4 1569
死守一世寂寞
死守一世寂寞 2020-11-27 21:43

This question has been asked before in a more general way. I want to display error messages on a particular page on my production server, and I do not have access to the

4条回答
  •  青春惊慌失措
    2020-11-27 22:22

    One other thing to note is that you probably not only want to display errors, you want to log them to file/database. Just showing errors to your users in the production environment is not enough; asking them to report the problems will lead to you not knowing what's wrong with your server until it's too late. In your base error and exception handler, make sure to have logic that records the issue (as much debugging info as possible - stack trace, user IP, browser, application version, etc) into persistent storage.

提交回复
热议问题