he hecho esto:
Código PHP:
echo "<form method=post name=f1 action=''>";
echo "<select name='dir' onchange=\"reload(this.form)\"><option value=''>Välj kategori</option>";
$dir= 'CATEGORY_DIR';//Give the path name U want to display insted of .
$files1 = scandir(CATEGORY_DIR);//Scaning the dir
$i=count($files1);//Calculate the number of folders
for($n=3;$n<$i;$n++)//#n=2 because to avoid . and ..
{
echo "<option>" . $files1[$n] ."</option>";//display the names
echo "<br>";
}
echo "</select>";
echo "<select name='subDir'>";
$dir2 = 'CATEGORY_DIR . $files1[$n]';
$files2 = scandir($dir2);
$a=count($files2);
for($b=3;$b<$a;$b++) {
echo "<option value='$files2[$b]'>" .$files2[$b] ."</option>";
echo "<br>";
}
echo "</select>";
echo "<input type='submit' name='check' value='check'/>";
echo "</form>"
Pero la parte que deberia mostrarme las carpetas dentro de las otras no muestra nada.
Seguire intentando