Forum Moderators: coopster
if (file_exists($xmlloc)){
$data = implode('', file($xmlloc));
}
else {
$fp = fopen($xmlloc,'r');
while(!feof($fp)){
$data = $data . fread($fp, 1024);
}
fclose($fp);
Unfortunately sometimes the file that I am trying to access is not available, and I get a 500 error as a reply, which produces an infinite loop in while(!feof($fp)), and thus infinite Warning messages, which are eating up my bandwidth.
Does anybody know how to modify the script, or how to turn off error messages in PHP?
Thank you for your help,
globay