html代码怎么存入数据库?

zhuhao 2013-10-28 07:23:16
请问这样的内容怎么存入数据库,我这些是采集到的内容,所以不一定。


<b style="color:#1E9EDC;">Description:</b>
<br>
<p>This product is a compact size multiple power system that is designed to power or recharge batteries of variety of portable electronic devices including most smart phones, game consoles, digital cameras, MP3/MP4, bluetooth headsets while you travel. It is also a flashlight with high, Low, and SOS three models of light functions.</p>
<b style="color:#1E9EDC;">Specifications:</b>
<br>
Battery type: Samsung 18650 Lithium-ion protection board
<br>
Flash Model: High/Low/SOS
<br>
Input: DC5V-700mA
<br>
Output: DC5V-1000mA
<br>
Led: Q5WD Cree
<br>
Luminous: 160lm
<br>
Shoot Distance: 200m
<br>
Charging time: 5hours
<br>

...全文
691 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
请问楼主,这个问题怎么解决的 ?
一起混吧 2013-10-28
  • 打赏
  • 举报
回复
get 方式传递的数据量有限制,建议你用post传递。
zhuhao 2013-10-28
  • 打赏
  • 举报
回复

<form name="form2" method="post" action="./function/search_new_product_change.php?title=<?PHP echo $title; ?>&rank=<?PHP echo $rank; ?>&imgurl=<?PHP echo $imgurl[0][0]; ?>¤cy=<?PHP  echo $currency; ?>&asin=<?PHP echo $asin; ?>&product_url=<?PHP echo $txt_url; ?>&miaoshu=<?PHP echo html_entity_decode($miaoshu); ?>" >
是这个$miaoshu没传过去,传的就是<b style="color:,请问这里怎么写
TR@SOE 2013-10-28
  • 打赏
  • 举报
回复
也可以考虑用base64编码一下,读出的时候解码。 你所描述的问题应该是由于引号而造成MySQL认为字段值已经结束。
一起混吧 2013-10-28
  • 打赏
  • 举报
回复
你的字段类型是什么? 用 text/mediumtext 试试。
zhuhao 2013-10-28
  • 打赏
  • 举报
回复
现在每次都只写了<b style="color:进去,其它都没写进去

21,894

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧