Php replaces textbox carriage return with html line feed code. The source of MailBody is sometimes the text content in TextBox. However, if you do not process the text content, the text will not have any format, and it will be squeezed together and displayed row by row. The source of the current Mail Body is sometimes the text content in TextBox. However, if the text content is not processed, the text will not have any format, and will be displayed row by row. What we are talking about now is how to make text content line break without being crowded together.
During single-step debugging, we will find that in the obtained text content, the line feed in the text is replaced with "rn", because it has never been found, leading to a large circle. After finding this cause, you can replace this string with
.
Ex: string strBody = Body. Replace ("rn ","
");
Although it was easy, it was really a headache when I didn't know it at the time. I hope it will be useful to you too.
Instance
If ($ _ POST ){
Echo str_replace (chr (13 ),'
', $ _ POST [' t']);
}
?>
For more details, see http://www.bKjia. c0m/phper/29/ff8b04e8f5b663b8b86d960321efcc83.htm
The source of the http://www.bkjia.com/PHPjc/632273.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/632273.htmlTechArticleMail Body is sometimes directly the text content in TextBox, but if there is no processing of the text content, the text will have no format, crowded together, display row by row. Now...