两种解决方案:
- PHP功能
nl2br()
:
例如,
echo nl2br("Thisrnisnranstringr");// will outputThis<br />is<br />a<br />string<br />- 将输入内容包装在
<pre></pre>
标签中。

两种解决方案:
nl2br():
例如,
echo nl2br("Thisrnisnranstringr");// will outputThis<br />is<br />a<br />string<br /><pre></pre>标签中。