dsj2222222 2013-05-21 18:52
浏览 27

Php html正在打印在页面上

I have and html string like this : <div class="short-description"> <h2></h2> <div class="std"><p>This <strong>1-1/2 in by 25 ft. Deluxe In-Ground Pool Vacuum Hose</strong> fits most in-ground residential and commercial pool cleaning applications. The continuous spiral wound construction of the vacuum hose provides excellent flexibility and strength. The smooth spiral design inner wall also allows for maximum efficiency of water flow.</p><br /><p><em>**Color may be blue or grey**</em></p></div> </div>

I encoded it using htmlentities and again decoding it using html_entity_decode it decoding successfully but when on the web browser it coming like : "<div></div>" the html is printed out on the page.

I know this is not related to encoding the html is saved in db table any idea on this.

Thanks

  • 写回答

1条回答 默认 最新

  • dongxing8766 2013-05-21 19:01
    关注

    You seem to have double-encoded your entities. Post the PHP code if you can't figure it out, but it looks like you are encoding an already html-entity-encoded string.

    评论

报告相同问题?

悬赏问题

  • ¥15 2024-五一综合模拟赛
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭