PHP 屏蔽warning

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-23 13:38:461118browse

php页面出现了若干个warning:

Warning: DOMDocument::loadXML(): Empty string supplied as input in ******.php on line 21 Call Stack: 0.0007 761568 ------中间省略一些警告语句-------.php:21 -40001

然后我在php添加语句-----error_reporting(E_ALL & ~E_NOTICE);后刷新页面,“-40001”竟然还屏蔽掉,实在是搞不懂。


回复讨论(解决方案)

error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING);

error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING);


你好斑竹,完全屏蔽了依然还是屏蔽不了-40001,而且彻底查了,-40001是警告语句,而不是我本身页面的数据。

ini_set('display_errors', 'off');error_reporting(0);


试试。

如果加了还有,那个-40001估计是你自己输出的东西了。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn