打开 php.ini 文件,搜索 display_errors = on,默认的应该是 on,即开启报错功能,改为 off 即可。
php.ini
display_errors = on
$ vi php.ini display_errors = off;