【发布时间】:2013-03-30 02:50:48
【问题描述】:
我想在mysql数据库中存储一些html代码,我以前没有这样做过,在db中存储html的正确方法是什么?
$html_code='<div class="hello"><p>hello world</p></div>';
// database table
part_name | html_code
hello | ??
【问题讨论】:
-
part_name | html_code hello | ??这是什么? -
你之前有没有将
anything存储在 MySQL 数据库中? -
但是当我在我的 php 中编码时,我想在我的 php .mysql_real_escape_string 函数输出错误中进行一些编码或解码