note 23277 added to function.feof

From: Date: Sat, 13 Jul 2002 22:58:27 +0000
Subject: note 23277 added to function.feof
Groups: php.notes 
Request: Send a blank email to php-notes+get-33030@lists.php.net to get a copy of this message
fwrite($fshadow,$y) is the cause of time exceed. Maybe to many open files are the reason of not checking the feof. <? $fp2=fopen("saints.html","r"); $x="0"; while(!feof($fp2)) { while($x!="\n") { $x=fgetc($fp2); $piece=$piece.$x; } $counter=1; $fshadow=fopen("IEnew".$counter.".php","w"); $fsr=fopen("IE.php","r"); $xsum="<? \n".chr(36)."name=".$piece; fwrite($fshadow,$xsum); while(!feof($fsr)) { $y=fgetc($fsr); echo $y; fwrite($fshadow,$y); } rewind($fsr); fclose($fsr); fclose("IEnew".$counter.".php"); $counter++; } fclose($fp2); ?> -- http://www.php.net/manual/en/function.feof.php http://master.php.net/manage/user-notes.php?action=edit+23277 http://master.php.net/manage/user-notes.php?action=delete+23277 http://master.php.net/manage/user-notes.php?action=reject+23277

« previous php.notes (#33030) next »