在 html 中,它将显示以下内容:
<pre>
I am using stackoverflow
I like stackoverflow
Stackoverflow is cool!
</pre>
当我使用 php 抓取该内容时,它会在 mysql db 中显示以下内容:
I am using stackoverflow I like stackoverflow Stackoverflow is cool!
它将显示在一行中并且没有任何字符串 /n 或 /r 并且希望它在 mysql db 中显示正确的间距/换行符。很高兴知道如何验证换行符的每一步,并从 html 到 string,然后从 string 到 mysql。