/ Published in: PHP
List files within a directory while ignoring system folders such as "Thumbs.db" as well as "." and "..".
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php function listFiles($dir) { if($file != "." && $file != ".." && $file != "Thumbs.db"{ echo '<a target="_blank" href="'.$dir.$file.'">'.$file.'</a><br/>'."\n"; } } } } } ?>