$dir = getcwd()."/";
$dirScan = opendir($dir);
$tbDir = [];
$tbFile = [];
$excludeDir = array("..", ".", ".well-known", ".ftpquota", ".htaccess", ".htpasswd", "robots.txt", "favicon.ico");
// Directories
while ($f = readdir($dirScan)) {
//if( ($f != ".") && ($f != "..") ) {
if( !in_array($f, $excludeDir) ) {
if(is_dir($f)) {
$tbDir[$f] = "dir";
} else {
$tbFile[$f] = "file";
}
}
}
closedir($dirScan);
ksort($tbDir);
ksort($tbFile);
foreach($tbDir as $k => $v) {
$theElement = "
" . $k;
echo "
";
}
foreach($tbFile as $k => $v) {
$theElement = "
" . $k;
echo "
";
}
?>
?>