Ver Mensaje Individual
  #9 (permalink)  
Antiguo 21/06/2006, 05:20
Avatar de Azrael666
Azrael666
 
Fecha de Ingreso: noviembre-2004
Mensajes: 652
Antigüedad: 19 años, 5 meses
Puntos: 1
a ver.. prueba esto... añades esta funcion:

Código PHP:
function dir_exists($dir_name false$path '') {
   if(!
$dir_name) return false;
   
   if(
is_dir($path.$dir_name)) return true;
   
   
$tree glob($path.'*'GLOB_ONLYDIR);
   if(
$tree && count($tree)>0) {
       foreach(
$tree as $dir)
           if(
dir_exists($dir_name$dir.'/'))
               return 
true;
   }
   
   return 
false;
 } 

y el codigo lo pones asi:

Código PHP:
$path "la ruta"
$directorio opendir($path);
$carpeta readdir($directorio);  
echo 
"<select name=\"listamicarpeta\">";
while (
$carpeta readdir($directorio))
 {
 if (
dir_exists($carpeta,$path)) echo "<option name=\"$carpeta\" value=\"$carpeta\">$carpeta</option>";
 }
closedir($directorio);
 echo
"</select>"
a ver ahora...
__________________
ALOZORRO v5.0 (ahora en .es)