Page 1 of 1

Multiple file opening analysis and closing

Posted: Mon Jul 22, 2002 10:57 am
by Manx
I'm fairly new to php, and am having problems figguring out how to deal with this scenario.

I'd like to create a script that opens up files within a loop statement looking for certain log data, close it and then open the next and do the same thing. I've got the analysis part to work right, but can't seem to get the file handling functions (the loop bit) to work properly. I've tried creating an index file, but since the file list is always changing....this isn't really a viable option. Any help would be appreciated, since there are several hundred log files to check through.

Posted: Mon Jul 22, 2002 11:15 am
by jason
post the code that you have (the loop part) so we can see where you are trying to go with this

Posted: Mon Jul 22, 2002 11:18 am
by RandomEngy
Php.net doesn't seem to be working right now, but when it's up you can search for the function readdir and go from there.

Posted: Mon Jul 22, 2002 11:21 am
by jason
http://ca.php.net is working fine. :D