Re: como tener un listado rapido de un directorio
| From: | Juan Pablo Aqueveque | Date: | Wed, 25 Sep 2002 08:57:17 +0000 |
| Subject: | Re: como tener un listado rapido de un directorio | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-27367@lists.php.net to get a copy of this message | ||
recuerda ...php.net es tu amigo
http://www.php.net/manual/en/function.readdir.php
// Note that !== did not exist until 4.0.0-RC2
<?php
if ($handle = opendir('/path/to/files')) {
echo "Directory handle: $handle\n";
echo "Files:\n";
/* This is the correct way to loop over the directory. */
while (false !== ($file = readdir($handle))) {
echo "$file\n";
}
/* This is the WRONG way to loop over the directory. */
while ($file = readdir($handle)) {
echo "$file\n";
}
closedir($handle);} ?> At 09:27 25-09-2002 -0500, you wrote:
Hola lista. me pueden ayudar con un codigo rápido para obtener el resultado de un ls de un directorio.??? Gracias _________________________________________________________ Do You Yahoo!? Información de Estados Unidos y América Latina, en Yahoo! Noticias. Visítanos en http://noticias.espanol.yahoo.com --------------------------------------------------------------------- Archivo On-line: http://www.phpes.com/________________________________________________________ Juan Pablo Aqueveque <juque@uct.cl> Ingeniero de Sistemas Departamento de Redes y Comunicaciones http://www.drc.uct.cl Universidad Católica de Temuco. Tel:(5645) 205 630 Fax:(5645) 205 628via news: news://news.phpes.com/Manual PHP en español: http://www.php.net/manual/es/ Para dar de baja la suscripción, mande un mensaje a: lista-unsubscribe@phpes.com