Home  >  Article  >  Backend Development  >  How to turn off warning prompt in php

How to turn off warning prompt in php

王林
王林Original
2020-07-14 16:11:414695browse

The way to turn off the warning prompt in PHP is through the error_reporting() function. The error_reporting() function can set the error reporting level of the current script. The specific code is: [error_reporting(0);].

How to turn off warning prompt in php

#To turn off the warning prompt, you can use the error_reporting() function.

(Recommended tutorial: php tutorial)

Related function introduction:

error_reporting() function specifies which error to report. This function sets the error reporting level for the current script. This function returns the old error reporting level.

Function syntax:

error_reporting(report_level)

Parameter introduction:

  • report_level Optional. Specifies the error reporting level for the current script. Both value numbers and constant names are accepted, however, for compatibility with future PHP versions, it is recommended to use constant names.

Code implementation:

<?php
    error_reporting(0);
?>

The above is the detailed content of How to turn off warning prompt in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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

Related articles

See more