Hi, folks.
I input an RSS news feed on to my site and I use a PHP routine to parse the input. I barely know PHP; basically, I learned just enough to get the feed working.
I would now like to make a small edit to the code and am seeking some help.
Presently, if the XML input stream cannot be opened, the code outputs a message and then dies. Here is the code:
if (!($fp = fopen($file, "r"))) {
die("could not open XML input");
}
Since this code is one of the first things the page does when loading, if the stream cannot be opened, the rest of the page doesn't display.
What I'd like to do now is to have the rest of the page display properly even when the PHP code encounters an error (the rest of the page is just static HTML).
Any suggestions for an alternative to the "die" approach I am presently using?
Thanks.
David