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

How to turn off warning prompt in php

王林
Release: 2023-03-02 15:06:01
Original
4718 people have browsed it

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)
Copy after login

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);
?>
Copy after login

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!

Related labels:
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template