Php Don';在输入值中处理html
我的mysql表中有一个包含html代码的条目:Php Don';在输入值中处理html,php,html,mysql,Php,Html,Mysql,我的mysql表中有一个包含html代码的条目: <p>Hello!</p> 以下是条目: <p><ol><li>HKCU/Software/Microsoft/Windows/NT/CurrentVersion/WindowsLegacy/DefaultPrinterMode<li> Set to 0 (on)</ol> HKCU/Software/Microsoft/Windows/NT/CurrentV
<p>Hello!</p>
以下是条目:<p><ol><li>HKCU/Software/Microsoft/Windows/NT/CurrentVersion/WindowsLegacy/DefaultPrinterMode<li> Set to 0 (on)</ol>
HKCU/Software/Microsoft/Windows/NT/CurrentVersion/WindowsLegacy/DefaultPrinterMode我想这样就行了
<textarea><?php echo $row['details'];?></textarea>
尝试保存数据,如
ascii_to_entities($this->input->post('ur_textara_name'));
在展示的时候
entities_to_ascii()
你必须转义特殊字符。你可以用它来做 此外,您不应为textarea设置值,而应将其写入其内容:
<textarea>
<?php /* some code here */ ?>
</textarea>
您对文本区域的期望是什么?您不能在文本区域中显示段落,只能在元素中显示文本区域内容。您好,我希望显示HKCU/Software/Microsoft/Windows/NT/CurrentVersion/WindowsLegacy/DefaultPrinterMode<textarea>
<?php /* some code here */ ?>
</textarea>