Re: PHP script + read file

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

 



Jerry Swanson wrote:

I know how to read a file. But the problem is different, I have
directory that has more than 250 files. I need to read each file and
process it. But How I know what file to read?
ls -l (show all files). How I can select each file without knowing
name? The file will be process and than delete.

Any ideas?



Something like this?

$dp = opendir('dirname');
while ($file = readdir($dp)) {
 // Process file, filename $file
}
closedir($dp);

--
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