PHP-scream扩展(使@失效)

来源:互联网 发布:linux设置域名服务器 编辑:程序博客网 时间:2024/04/29 14:32

需要安装

// Make sure errors will be shownini_set('display_errors', true);error_reporting(E_ALL);// Disable scream - this is the default and produce an errorini_set('scream.enabled', false);echo "Opening http://example.com/not-existing-file\n";@fopen('http://example.com/not-existing-file', 'r');// Now enable scream and try againini_set('scream.enabled', true);echo "Opening http://example.com/not-existing-file\n";@fopen('http://example.com/another-not-existing-file', 'r');

输出

Opening http://example.com/not-existing-fileOpening http://example.com/not-existing-file
//开启scream后任然会报错Warning: fopen(http://example.com/another-not-existing-file): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in example.php on line 14

原创粉丝点击