Jump to content

search site and replace a string on a big site.


carlf

Recommended Posts

I have a site with MANY (over 30,000) directories with 15 php pages in each.  I need to search the whole site and replace the string  <--    with    <?--  .          Any suggestions? 

 

I can do it on my local PC, but I have spent over 50 hours uploading directories and do not want to start over, if I can help it.

You could also write a str_replace script in PHP?

 

Can't think of it off the top of my head, but you'd need a recursive function to list the directory (recursive because you might have directories within directories), then foreach file open and str_replace.

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.