An error control operator "@" is provided in PHP, and we do not want an error message to be displayed to the customer when there are some expressions that may be wrong during the run, which is unfriendly to the user. Therefore, you can put the @ before a PHP expression, any error message that the expression may produce is ignored;
If the Track_error (which is set in php.ini) is activated, any error message generated by the expression is stored in the variable $php_errormsg, which is overwritten every time an error occurs, so you must check it as early as possible if you want to use it.
It is important to note that the error control prefix "@" does not mask the parsing of the error information, it cannot be placed before the definition of a function or class, nor can it be used for conditional structures such as if and foreach.
Task
Look at the effect of the error control operator!
In the 2nd line of the editor on the right, enter an instruction "$conn = @mysql_connect (" localhost "," username "," password ");",:
In the 2nd line of the editor on the right, enter an instruction "$conn = @mysql_connect (" localhost "," username "," password ");",:
Error control operators in 12.PHP