我有一个非常简单的页面,它获取一个URL并解析一些数据.
我已经在我的页面中内置了一些错误处理,如果响应是404错误.
但是,我似乎无法阻止php吐出以下错误
Warning: file_get_contents(http://url-to-retrieve.com/123.html) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /var/www/html/maickl/procs/get.php on line 84
Notice: Undefined offset: 0 in /var/www/html/maickl/procs/get.php on line 91
我用这个页面开始
error_reporting(0)
有关为什么会发生这种情况的任何建议,为什么这些错误没有被抑制(似乎只在这个页面上),以及我能做些什么呢?