Home >Backend Development >PHP Tutorial >How to Suppress Strict Standards Error Reporting in PHP 5?
Disabling Strict Standards Error Reporting in PHP 5
Question:
How can I disable the strict standards error reporting in my PHP 5 script?
Answer:
Depending on your specific requirements, you can either disable error reporting entirely or prevent the user from seeing the errors while still logging them. For the latter approach, you can use the following code:
This code will suppress the display of errors, but it will still log them to your standard system log or to a custom location specified by the error_log directive.
Note:
It is generally advisable to log errors, even on a production site. This allows you to monitor errors and resolve issues before they impact the user experience.
The above is the detailed content of How to Suppress Strict Standards Error Reporting in PHP 5?. For more information, please follow other related articles on the PHP Chinese website!