Re: ouput the contents of a folder for download

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



# ross@xxxxxxxxxxxxx / 2007-01-22 20:25:49 -0000:
> $dir = "mydirectory";
> 
> // Open a known directory, and proceed to read its contents
> if (is_dir($dir)) {
>    if ($dh = opendir($dir)) {
>        while (($file = readdir($dh)) !== false) {
> 
>             echo  filetype($file) . "\n";
>              echo filesize($file);
>        }
>        closedir($dh);
>    }
> }
> 
> 
> This is what I have so far but I cannot get a filename or get it to iterate 
> through all the files in a folder.

What does it do instead?

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux