Multiple file opening analysis and closing

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Manx
Forum Newbie
Posts: 4
Joined: Mon Jul 22, 2002 10:57 am

Multiple file opening analysis and closing

Post 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.
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Post by jason »

post the code that you have (the loop part) so we can see where you are trying to go with this
User avatar
RandomEngy
Forum Contributor
Posts: 173
Joined: Wed Jun 26, 2002 3:24 pm
Contact:

Post 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.
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Post by jason »

http://ca.php.net is working fine. :D
Post Reply