Cless Posted May 31, 2009 Share Posted May 31, 2009 I need to iterate through a directory, which only contains .txt files. Except, I need to use PHP, preferably. What I want to do is loop through the contents of all files in a directory: open the file, use the str_replace function on the file, save it, then move onto the next file. Is there a way to do this with PHP? Link to comment https://forums.phpfreaks.com/topic/160408-solved-iterating-through-files/ Share on other sites More sharing options...
Ken2k7 Posted June 1, 2009 Share Posted June 1, 2009 glob Link to comment https://forums.phpfreaks.com/topic/160408-solved-iterating-through-files/#findComment-846483 Share on other sites More sharing options...
Cless Posted June 1, 2009 Author Share Posted June 1, 2009 Thanks! Link to comment https://forums.phpfreaks.com/topic/160408-solved-iterating-through-files/#findComment-846487 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.