html代码怎么存入数据库?

php中文网
发布: 2016-06-23 14:25:12
原创
2069人浏览过

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

<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>
                    <div class="aritcle_card">
                        <a class="aritcle_card_img" href="/ai/1104">
                            <img src="https://img.php.cn/upload/ai_manual/001/503/042/68b6c5d39a38c971.png" alt="阿里云-虚拟数字人">
                        </a>
                        <div class="aritcle_card_info">
                            <a href="/ai/1104">阿里云-虚拟数字人</a>
                            <p>阿里云-虚拟数字人是什么? ...</p>
                            <div class="">
                                <img src="/static/images/card_xiazai.png" alt="阿里云-虚拟数字人">
                                <span>2</span>
                            </div>
                        </div>
                        <a href="/ai/1104" class="aritcle_card_btn">
                            <span>查看详情</span>
                            <img src="/static/images/cardxiayige-3.png" alt="阿里云-虚拟数字人">
                        </a>
                    </div>
                <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>
登录后复制


回复讨论(解决方案)

现在每次都只写了

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

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

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

<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]; ?>&currency=<?PHP  echo $currency; ?>&asin=<?PHP echo $asin; ?>&product_url=<?PHP echo $txt_url; ?>&miaoshu=<?PHP echo html_entity_decode($miaoshu); ?>" >
登录后复制


是这个$miaoshu没传过去,传的就是

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

HTML速学教程(入门课程)
HTML速学教程(入门课程)

HTML怎么学习?HTML怎么入门?HTML在哪学?HTML怎么学才快?不用担心,这里为大家提供了HTML速学教程(入门课程),有需要的小伙伴保存下载就能学习啦!

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号