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);].
#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!