note 93020 deleted from function.readdir by danbrown

From: Date: Wed, 19 Aug 2009 20:33:07 +0000
Subject: note 93020 deleted from function.readdir by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-159656@lists.php.net to get a copy of this message
Note Submitter: hassanishome at hotmail dot com Reason: bad code ---- in the second example the lind break /n dosnt function in php5 the proper code to list files is: <?php if ($handle = opendir('./pdf')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { echo "$file\n"; echo "<br/>"; } } closedir($handle); } ?> hassan kazem www.lovooo.com

« previous php.notes (#159656) next »