note 99580 deleted from function.fgets by danbrown

From: Date: Wed, 25 Aug 2010 14:02:14 +0000
Subject: note 99580 deleted from function.fgets by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-172052@lists.php.net to get a copy of this message
Note Submitter: guoliang.li at live dot c0m ---- I don't think this is a Good example: <?php $f = fopen ("fgetstest.php", "r"); $ln= 0; while ($line= fgets ($f)) { ++$ln; printf ("%2d: ", $ln); if ($line===FALSE) print ("FALSE\n"); // if $line is false, the while not run to this line. else print ($line); } fclose ($f); ?>

« previous php.notes (#172052) next »