If you’re using php to read the contents of various files in order to construct a web page, you don’t want a missing file to result in error messages all over the web page. Use the error control operator and a conditional to prevent this happening:
$filename = 'thefile';
if ($file = @fopen($filename, 'r')) {
while(!feof($file)) {
echo fgets($file);
}
fclose($file);
}
else {
echo 'Unable to open '.$filename;
}