时间:2021-07-01 10:21:17 帮助过:55人阅读
$s='afdafd jjk ddl'; echo preg_replace('/\s+/',',',$s);
------解决方案--------------------
$str = preg_replace('#[\r\n]+#','
',$str);
$str = preg_replace('#\s+#',',',$str);
------解决方案--------------------
echo preg_replace('/\s/i', '', file_get_contents('http://www.a744.com/text.txt'));