I would suggest in the future, doing a compare of the old and new file
contents and make a note when they are different. That way if something
goes wrong, you know which files were changed.
On Wed, Dec 30, 2009 at 4:05 AM, Konstantin K wrote:
> Hey folks,
>
> I went with the following and it w
Hey folks,
I went with the following and it works nicely:
$path_to_file = 'path/to/the/file';
$file_contents = file_get_contents($path_to_file);
$file_contents = str_replace("what_to_replace","replace_with",$file_contents);
file_put_contents($path_to_file,$file_contents);
courtesy of:
http://st
I meant to say programmatically.. :)
On Tue, Dec 29, 2009 at 11:32 PM, Eddie Drapkin wrote:
> On Tue, Dec 29, 2009 at 11:30 PM, Konstantin K wrote:
>> Hi folks,
>>
>> I need to search for and replace a string inside many PHP (source) files
>>
>> I was thinking of using http://pear.php.net/packag
On Tue, Dec 29, 2009 at 11:30 PM, Konstantin K wrote:
> Hi folks,
>
> I need to search for and replace a string inside many PHP (source) files
>
> I was thinking of using http://pear.php.net/package/File_SearchReplace
> but it's not maintained anymore.
>
> 1. Any suggestions how I should approach
Hi folks,
I need to search for and replace a string inside many PHP (source) files
I was thinking of using http://pear.php.net/package/File_SearchReplace
but it's not maintained anymore.
1. Any suggestions how I should approach this problem?
2. What tools do you recommend?
3. Should I be on the