php中替换指定的TXT文本内容怎么替换。

需要替换掉的地方是哪个IP,或者可以重新写入也可以,function FindProxyForURL(url, host) { return "PROXY 114.226.160.169:44932;"; } 这是需要写入的内容,

$findstr='13800|这里是移动客服'; //你要查找替换的 是这东西
$replacestr='13800|这里是移动客服|你好';
for($i=0;$i<count($farray);$i++){
if($farray[$i]==$findstr){
//unset($farray[$i]);
//替换操作。。。
<a href="https://www.baidu.com/s?wd=str_replace&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1d9njPbuj7hmWbvmHT1njDd0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6K1TL0qnfK1TL0z5HD0IgF_5y9YIZ0lQzqlpA-bmyt8mh7GuZR8mvqVQL7dugPYpyq8Q1cYnHTYrHbYnWc1PW0zn1DzP0" target="_blank" class="baidu-highlight">str_replace</a>($findstr,$replacestr,$array[$i]);
break;
}<img id="selectsearch-icon" src="https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/iknow/qb/select-search.png" alt="搜索">
温馨提示:答案为网友推荐,仅供参考