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 <[email protected]> wrote: > 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://stackoverflow.com/questions/1438563/find-and-replace-in-a-file > > Konstantin > > >
_______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation
