Opendir listing

From: Date: Thu, 20 Feb 2003 20:34:12 +0000
Subject: Opendir listing
Groups: php.general 
Request: Send a blank email to php-general+get-136410@lists.php.net to get a copy of this message
How do I remove the '.' and '..' from displaying with the following script? I want just the files, not the dots. <?php if ($handle = opendir('graphics/')) { echo "Files:<br>\n"; /* This is the correct way to loop over the directory. */ while (false !== ($file = readdir($handle))) { echo "<a href=\"$file\">$file</a><br>\n"; } closedir($handle); } ?> -- Mike Yrabedra President 323, Inc. Home of The MacDock and The MacSurfshop [http://macdock.com] : [http://macsurfshop.com] VOICE: 770.382.1195 iChat/AIM: ichatmacdock _______________________________________________________________________ "Whatever you do, work at it with all your heart, as working for the Lord, not for men." ~Colossians 3:23 <{{{>< --

« previous php.general (#136410) next »