PHP 屏蔽warning

WBOY
Release: 2016-06-23 13:38:46
Original
1079 people have browsed it

php页面出现了若干个warning:

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

然后我在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);
Copy after login


试试。

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template