function list_files($dir)<br />{<br /> if(is_dir($dir))<br /> {<br /> if($handle = opendir($dir))<br /> {<br /> while(($file = readdir($handle)) !== false)<br /> {<br /> if($file != "." && $file != ".." && $file != "Thumbs.db"/*pesky windows, images..*/)<br /> {<br /> echo '<a target="_blank" href="'.$dir.$file.'">'.$file.'</a><br>'."\n";<br /> }<br /> }<br /> closedir($handle);<br /> }<br /> }<br />}