PHP shields error prompts
Method 1:
Before the function that may cause errors Add @, then or die("")
such as:
@mysql_connect(...) or die("Database Connect Error")
Method 2:
Edit php.ini, search for "display_errors=", and change the value after "=" to "off.
Method 3:
In Add error_reporting(0) before the php script to block all error prompts.
Among them, error_reporting configures the level of error information reporting.
Syntax:
int error_reporting(int [level]);
Return value: Integer
Recommended tutorial: PHP video tutorial
The above is the detailed content of php error shield. For more information, please follow other related articles on the PHP Chinese website!