Ver Mensaje Individual
  #3 (permalink)  
Antiguo 08/04/2012, 20:10
exangel
 
Fecha de Ingreso: abril-2008
Mensajes: 613
Antigüedad: 16 años
Puntos: 22
Respuesta: Lectura de nombres de archivos

Hola,
Te copio un script de PHP que utilizo para listar directoios. Por si te sirve:

<?php
$rutaproyecto="tucarpeta";
function getDirectory( $path = '.', $level = 0 ){
$ignore = array( 'cgi-bin', '.', '..' );
$dh = @opendir( $path );
while( false !== ( $file = readdir( $dh ) ) ){
if( !in_array( $file, $ignore ) ){
$spaces = str_repeat( '&nbsp;', ( $level * 4 ) );
$ruta=$path."/".$file;
if( is_dir( $ruta ) ){
echo "<strong>$spaces $file</strong><br />";
getDirectory( "$path/$file", ($level+1) );
} else {
echo $ruta." >> ".date('l dS \of F Y h:i:s A',filemtime ($ruta))."<br>";
}
}
}
closedir( $dh );
}

getDirectory( $rutaproyecto );
?>
__________________
Compartir es vivir
www.programador-php.com