<?php
$dir = './';
$okfiletypes = array('php','html');
$files = array();
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
if (($file != '.') && ($file != '..')) {
//if (in_array(strtolower(substr($file,(strrpos($file,'.')+1))),$okfiletypes)) {
$files[] = $file;
//}
}
}
closedir($dh);
}
}
sort($files);
foreach ($files as $file) {
echo '<div><a href="'.$file.'">'.$file.'</a></div>';
}
?>