一、使用str_repalce替换 $str = str_replace(array("\r\n", "\r", "\n"), "", $str); 二、对输出字段两段增加" $str = "\""+$str+"\"";