[PHP] string replace in files

2004-04-30 Thread Steve Buehler
I am trying to write a script that will replace a string in a file. Actually, about 3000 files. And I am stuck. I can get the list of files, but then I pretty much become stuck. I wanted to try str_ireplace (not sure if that is what I should use or not), but I can't even get far enough to

Re: [PHP] string replace in files

2004-04-30 Thread John W. Holmes
From: Steve Buehler [EMAIL PROTECTED] I am trying to write a script that will replace a string in a file. Actually, about 3000 files. And I am stuck. I can get the list of files, but then I pretty much become stuck. I wanted to try str_ireplace (not sure if that is what I should use or

Re: [PHP] string replace in files

2004-04-30 Thread Steve Buehler
At 11:27 AM 4/30/2004, John W. Holmes wrote: From: Steve Buehler [EMAIL PROTECTED] #!/usr/bin/php ? $strtoreplace=require \http://www.domain.com/;; $replacewithstring=require \/home/domain/www/; replacestring(); function replacestring(){ GLOBAL $strtoreplace,$replacewithstring;

Re: [PHP] string replace in files

2004-04-30 Thread John W. Holmes
From: Steve Buehler [EMAIL PROTECTED] Thank you so much for this. I was thinking of it all wrong when doing this. I have a couple of other questions to go along with this. 1. How would I change this to do a recursive search for the .php files instead of just the *.php or */*.php