Home > Backend Development > PHP Tutorial > How Can I Disable Strict Standards Error Reporting in PHP 5?

How Can I Disable Strict Standards Error Reporting in PHP 5?

Barbara Streisand
Release: 2024-11-26 04:32:08
Original
713 people have browsed it

How Can I Disable Strict Standards Error Reporting in PHP 5?

Disabling Strict Standards Error Reporting in PHP 5

To disable error reporting for strict standards, you can use the following code:

ini_set('display_errors', '0');
error_reporting(E_ALL | E_STRICT);
Copy after login

The ini_set() function sets the display errors option to '0', which prevents the user from seeing error messages. The error_reporting() function sets the error reporting level to include strict standards errors, but they will not be displayed.

Instead, they will be logged to the standard system log or a specified location set using the error_log directive. This allows you to log errors without interrupting the user's experience.

The above is the detailed content of How Can I Disable Strict Standards Error Reporting in PHP 5?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template