note 46988 rejected from function.fopen by sean

From: Date: Fri, 29 Oct 2004 16:29:35 +0000
Subject: note 46988 rejected from function.fopen by sean
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-79321@lists.php.net to get a copy of this message
Note Submitter: olivier at ultragreen dot net ---- I have some desease using PHP 5.0.1's fopen function. If the specified file does not exist fopen correctly returns false but the function sends a warning message. I wonder if it's still the same in further version of PHP 5. Because this code produces a warning. Is it a bug or a feature ? $toto=fopen('toto.txt','r'); if(!$toto) return "error message"; fread($toto,64000); fclose($toto);

« previous php.notes (#79321) next »