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

来源:互联网 发布:java命名 编辑:程序博客网 时间:2024/06/08 01:31

$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);
0 0
原创粉丝点击