note 46988 added to function.fopen

From: Date: Fri, 29 Oct 2004 15:43:55 +0000
Subject: note 46988 added to function.fopen
Groups: php.notes 
Request: Send a blank email to php-notes+get-79320@lists.php.net to get a copy of this message
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); ---- Manual Page -- http://www.php.net/manual/en/function.fopen.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+46988 Delete -- http://master.php.net/manage/user-notes.php?action=delete+46988&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+46988&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+46988&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+46988&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+46988&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+46988&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+46988&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#79320) next »