busillis Posted July 17, 2008 Share Posted July 17, 2008 Warning: file_get_contents(http://www.website.com/default blog user/rss) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in C:\wamp\www\1STA\includes\rss.php on line 3 Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in C:\wamp\www\project\includes\rss.php:4 Stack trace: #0 C:\wamp\www\project\includes\rss.php(4): SimpleXMLElement->__construct('') #1 C:\wamp\www\project\viewProfile.php(271): displayUsersBlogFeed('default blog us...') #2 {main} thrown in C:\wamp\www\1STA\includes\rss.php on line 4 I want it to realise when this error occurs, so that it doesnt display this message, and so that the function im using displayUsersBlogFeed(useraccount) can handle it in a nice way? Quote Link to comment https://forums.phpfreaks.com/topic/115217-php-error-handle/ Share on other sites More sharing options...
DeanWhitehouse Posted July 17, 2008 Share Posted July 17, 2008 not sure if this will work, but put at the top error_reporting(0); or it might be error_report(0); Quote Link to comment https://forums.phpfreaks.com/topic/115217-php-error-handle/#findComment-592390 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.