Re: readdir(), opendir()
| From: | Esteban Fern�ndez | Date: | Thu, 29 May 2003 20:46:59 +0000 |
| Subject: | Re: readdir(), opendir() | ||
| References: | 1 2 3 4 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-36797@lists.php.net to get a copy of this message | ||
Puaj!!.. Con tanto codigo encima ya no se que hago :P Gracias.
"Pablo E. Siciliano" <psiciliano@puentenet.com> escribió en el mensaje
news:001e01c32624$3be44680$2300a8c0@puentenet.com...
> De nada.
> No será que estas haciendo $files_array = array(); adentro del while?
>
> Otra cosa: Antes de hacer el for, usá sort().
>
> ----- Original Message -----
> From: "Esteban Fernández" <efernandez@tecsol.cl>
> To: <lista@phpes.com>
> Sent: Thursday, May 29, 2003 5:33 PM
> Subject: Re: [PHP-ES] readdir(), opendir()
>
>
> >
> > <?php
> > $handle=opendir('.');
> > while ($file = readdir($handle)) {
> > $files_array = array();
> > if ($file != "." && $file != "..") {
> > array_push($files_array, $file);
> > }
> > }
> > closedir($handle);
> >
> > for ($i=0;$i<=count($files_array);$i++) {
> > printf("File: %s<br>", $files_array[$i]);
> > }
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.481 / Virus Database: 277 - Release Date: 13/05/03
>
>