• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

html代码怎么存入数据库?

php 搞代码 3年前 (2022-01-23) 12次浏览 已收录 0个评论
文章目录[隐藏]

请问这样的内容怎么存入数据库,我这些是采集到的内容,所以不一定。

<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 smar<p style="color:transparent">。本文来源gao!%daima.com搞$代*!码网1</p><cite>搞代gaodaima码</cite>t 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>

回复讨论(解决方案)

现在每次都只写了<b style="color:进去,其它都没写进去

你的字段类型是什么? 用 text/mediumtext 试试。

也可以考虑用base64编码一下,读出的时候解码。

你所描述的问题应该是由于引号而造成MySQL认为字段值已经结束。

&rank=<?PHP echo $rank; ?>&imgurl=<?PHP echo $imgurl[0][0]; ?>&currency=<?PHP  echo $currency; ?>&asin=<?PHP echo $asin; ?>&product_url=<?PHP echo $txt_url; ?>&miaoshu=<?PHP echo html_entity_decode($miaoshu); ?>" >

是这个$miaoshu没传过去,传的就是<b style="color:,请问这里怎么写

get 方式传递的数据量有限制,建议你用post传递。


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:html代码怎么存入数据库?
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址