php 修改文件内容,替换指定内容

$f='./test.txt';

file_put_contents($f,str_replace('{{modulename}}','Hospital',file_get_contents($f)));

原文地址:https://www.cnblogs.com/zonglonglong/p/7092538.html