php 打开文件、字段替换、写入文件

2019-04-28  本文已影响0人  Medicine_8d60

$contents = file_get_contents("phone.vcf");

str=str_replace(array("\r","\n"),'',contents);

$myfile = fopen("newfile.txt", "w") or die("Unable to open file!");

fwrite(myfile,str);
fclose($myfile);

上一篇 下一篇

猜你喜欢

热点阅读