<?php
function open_file($file) {
$f = @fopen($file, "r");
if (!$f) {
return PEAR::raiseError($php_errormsg);
}
return $f;
}
?>
<?php
$res = open_file($filename);
if (PEAR::isError($res)) {
die("Couldn't open file: " . $res->getMessage());
}
?>