Ver Mensaje Individual
  #4 (permalink)  
Antiguo 21/07/2008, 10:54
Avatar de eft0
eft0
 
Fecha de Ingreso: junio-2003
Ubicación: Santiago - Chile
Mensajes: 635
Antigüedad: 20 años, 10 meses
Puntos: 9
Respuesta: Leer archivos de un directorio

Oops, era readdir()

Código PHP:
<?php
if ($handle opendir('.')) {
    while (
false !== ($file readdir($handle))) {
        if (
$file != "." && $file != "..") {
            echo 
"$file\n";
        }
    }
    
closedir($handle);
}
?>
Luego en vez del echo utiliza una variable acumulador (str) y luego escribes un archivo a fwrite()
__________________
eft0's stuff! - http://estebanfernandez.net