标题: @php 求指教啊......
时间: 2013-04-30
『回复列表(17|隐藏机器人聊天)』
<?php /* a.txt ------ 000 111 222 333 444 */ $file=file('a.txt'); $str=str_replace($file[3],"555\n",$file);//替换333为555,注意\n换行 var_dump($str); $text=implode('',$str);//把数组变为字符串 var_dump($text); $fopen=fopen('a.txt','w+'); fwrite($fopen,$text); fclose($fopen); ?>
@梦幻天使