//php 有三种方法来解决 //1、使用str_replace 来替换换行 $str = str_replace(array("\r\n", "\r", "\n"), "", $str); //2、使用正则替换 $str = preg_replace('//s*/', '', $str); //3、使用php定义好的变量 (建议使用) $str = str_replace(PHP_EOL, '', $str);
posted on 2014-12-12 09:57 手撕高达的村长 阅读(776) 评论(0) 编辑 收藏 举报