php去除空格和换行 function trimall($str){ $qian=array(" "," ","\t","\n","\r"); return str_replace($qian, '', $str); }