我有一只手脚:
software
hardware
educational
games
languages
.
.
.
我需要一份新文件:
software;hardware;educational;games;languages;....
我如何能够这样做?
我这样做了:
<?php
$one = file_get_contents( one.csv );
$patterns =" /\n/";
$replacements = ";";
$newone = preg_replace($patterns, $replacements, $one);
echo $newone;
file_put_contents( newone.csv , $newone );
?>
这增加了线末的半殖民地,但线的中断仍然存在。