note 18593 rejected from function.fopen by jimw

From: Date: Tue, 29 Jan 2002 01:16:48 +0000
Subject: note 18593 rejected from function.fopen by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-25947@lists.php.net to get a copy of this message
Currently I'm grabbing a bunch of files named test1.sav, test2.sav ... testN.sav if I do: $archive_number = 1; //Open each archive and display them. Works for files 1 to N. while ($fp = @fopen "post/test$archive_number.sav","r")){ while (!feof ($fp)) { $b = fgets($fp, 4096); echo "<BR>$b"; } $archive_number = archive_number + 1; } fclose($fp); I still get warnings - when it hits N+1 (ie the file doesn't exist.) Is there anyway to suppress this error?

« previous php.notes (#25947) next »