note 52847 deleted from function.readdir by tularis

From: Date: Sat, 14 May 2005 16:30:06 +0000
Subject: note 52847 deleted from function.readdir by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-89419@lists.php.net to get a copy of this message
Note Submitter: Sindre_g at hotmail dot com Reason: useless ---- This script only shows 3 of the files in a dir.. u can change it to 1 if u want.. <?php $path = "$urpath"; $dir = @opendir($path) or die("Unable to open $path"); $show= 3+2; //3 is the number of file that will be shown for ($i = 0; $i < $show; $i++){ $file = readdir($dir); if($file!="." && $file!=".."){ echo "<a href='$file'>$file</a><br>"; } } ?>

« previous php.notes (#89419) next »