Jump to content

[SOLVED] Iterating through files


Cless

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.