文本文件fff.txt中去除回车与空格;
$aa = file_get_contents('./fff.txt');
$bb = str_replace(array("\r\n", "\r", "\n"),'、',$aa);
echo "<pre>";
print_r($bb);
文本文件fff.txt中去除回车与空格;
$aa = file_get_contents('./fff.txt');
$bb = str_replace(array("\r\n", "\r", "\n"),'、',$aa);
echo "<pre>";
print_r($bb);
转载于:https://www.cnblogs.com/handongyu/p/6408370.html