Jump to content

PHP Error Handle


busillis

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/115217-php-error-handle/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.