摘要: <?php?$str="this is a test \n"; $patten = array("\r\n", "\n", "\r"); ?//先替换掉\r\n,然后是否存在\n,最后替换\r $str=str_replace($order, "", $str); ?> ?//php 有三种方法来解决 //1、使用str_replace 来替换换行 $str = str_replace(array("\r\n", "\r", "\n& 阅读全文
posted @ 2012-10-11 15:56 郑文亮 阅读(644) 评论(0) 推荐(0)