Block PHP Error Tip method One, add @ before a function that is likely to go wrong, and then or Die ("")
Such as:
@mysql_connect (...) or Die ("Database Connect Error")
Block PHP Error Prompt method Two, edit php.ini, look for "display_errors =", change the value after "=" to "off."
Block PHP Error Prompt method Three, add error_reporting (0) before the php script, and block all error prompts.
Error_reporting
Configure the level of error message return.
Syntax: int error_reporting (int [level]);
return value: Integer
Function type: PHP system function
Block PHP error prompt function content description
This function is used to configure the level of return of error information, and the bitmask is the bit mask of an integer, as shown in the table below.
Mask value represents name
E_error
E_warning
E_parse
E_notice
E_core_error
E_core_warning
E_notice indicates that the general situation is not recorded and only used if the program has an error condition, such as attempting to access a nonexistent variable or calling the stat () function to view a nonexistent file.
E_warning are usually displayed, but the execution of the program is not interrupted. This is very effective for debugging. For example: Call Ereg () with a problematic regular expression.
The e_error is usually displayed, and the program execution is interrupted. This mask cannot be traced to a memory configuration or other error.
E_parse parsing errors from the syntax.
E_core_error is similar to E_error, but does not include errors caused by PHP core.
E_core_warning similar to e_warning, but does not include PHP core error warnings.
error_reporting (7) = error_reporting (1+2+4) = error_reporting (E_error | e_waring | E_parse)
The above is to block PHP error prompt related implementation method.
http://www.bkjia.com/PHPjc/445954.html www.bkjia.com true http://www.bkjia.com/PHPjc/445954.html techarticle Block PHP Error Prompt method One, add @ before a function that is likely to go wrong, and then or die () such as: @mysql_connect (...) or Die (Database connect error) block PHP Error Prompt method Two, edit ...