1
我已在在MySQL字段正是这样以下apprear,htmlspecialchars不允许换行符?
Hello there
world
当I格式以上使用此代码:
echo htmlspecialchars($thestring)
它输出此,
Hello there<br/><br/>world
如何我可以让它做换行吗?
我想继续使用htmlspecialchars来帮助其他html字符。
'用htmlspecialchars '不会转换文字行分裂成任何东西。 – Quentin
你是否偶然在做'htmlspecialchars(nl2br($ text))'? – deceze
是的,当你问我检查代码后,它进一步链上了..谢谢 –