我有一个conf文件:
mon host = 1.1.1.1
cluster = test
我想编写“mon host”的新ip端,如:
mon host = 1.1.1.1, 2.2.2.2
cluster = test
我该怎么做?
答案 0 :(得分:2)
您可以使用-i
:
foreach
使用$r_nom = null;
foreach ($resto_nom as $r):
$r_nom = $r->r_nom;
$r_description = $r->r_description;
$r_specialite = $r->r_specialite;
$meta = $r_nom.', '.$r_specialite.", restaurant NosRepas, repas";
$description = $r_nom.' - '.$r_specialite.'. '.$r_description;
endforeach;
更改文件而不是打印到STDOUT。