Turn off warnings and errors on PHP and MySQL

前端 未结 6 1314
北荒
北荒 2020-11-27 11:30

I am getting expected notices and warnings and would like to turn them off in my PHP file. The error is:

Warning: fsockopen()

And the notic

6条回答
  •  独厮守ぢ
    2020-11-27 12:07

    Prepend functions with the '@' symbol to suppress certain errors, as opposed to turning off all error reporting.

    More information: http://php.net/manual/en/language.operators.errorcontrol.php

    PHP supports one error control operator: the at sign (@). When prepended to an expression in PHP, any error messages that might be generated by that expression will be ignored.

    @fsockopen();
    

提交回复
热议问题