$file
\n"; $num = ($num + 1); } } closedir($files); } $dir = "."; if(isset($_GET["dir"])) $dir = $_GET["dir"];