php 警告和错误屏蔽

error_reporting(0);//禁用错误报告 
error_reporting(E_ALL ^ E_NOTICE);//显示除去 E_NOTICE 之外的所有错误信息 
error_reporting(E_ALL^E_WARNING^E_NOTICE);//显示除去E_WARNING E_NOTICE 之外的所有错误信息 
error_reporting(E_ERROR | E_WARNING | E_PARSE);//显示运行时错误,与error_reporting(E_ALL ^ E_NOTICE);效果相同。 
error_reporting(E_ALL);//显示所有错误
posted @ 2017-09-25 14:22  托马斯·刘大爷  阅读(727)  评论(0)    收藏  举报