日期:2014-05-17 浏览次数:21035 次
$s='afdafd jjk ddl'; echo preg_replace('/\s+/',',',$s);
------解决方案--------------------
$str = preg_replace('#[\r\n]+#','<br>',$str);
$str = preg_replace('#\s+#',',',$str);
------解决方案--------------------
echo preg_replace('/\s/i', '', file_get_contents('http://www.a744.com/text.txt'));