Ren*_*Pot 12
如果您想拥有换行符,请使用PHP函数,nl2br()这样您就可以获得新行.
如果在该框中键入任何HTML.你会得到的.
不过,我建议不要储存<br>或HTML tags you add manually到数据库中,但后来做.nl2br()从数据库中获取该函数后应调用该函数.
文档:http://www.php.net/manual/en/function.nl2br.php
您可以使用此功能存储在数据库中
$a = htmlentities($orig);
Run Code Online (Sandbox Code Playgroud)
http://php.net/manual/en/function.htmlentities.php
从数据库中获取数据以在页面上显示时使用此功能
$b = html_entity_decode($a);
Run Code Online (Sandbox Code Playgroud)
http://php.net/manual/en/function.html-entity-decode.php
| 归档时间: |
|
| 查看次数: |
8204 次 |
| 最近记录: |