Forum Moderators: coopster
$handle = @fopen("http://some.resource.com","r") OR your_error_handling_routine("fopen failure");
the "@" in front of fopen will prevent fopen to output any error message to the browser and you can handle it in your own defined function.
I remember seeing a class for error handling somewhere on the net, if I can find it, I'll let you know.
mavherick
<added>found it DevShed [devshed.com]</added>
So the @ will supress these messages and load my current page EXCEPT the php areas of the page? or it will just show blank for the whole page?
I mean that the page has a bit of php code embedded in it but it is not 100% of the html
$handle = @fopen("http://someresource","r");
if($handle)
{
// display resource content
} else {
// display a nice little message like resource down check back later or even leave it blank
}
it won't terminate your script, everything else that is not based on the handler will work.
mavherick