繁体   English   中英

PHP HTML正在打印页面上的样子

[英]Php html is printing as it is on the page

我有这样的html字符串: <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> <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>

我使用htmlentities对其进行了编码,然后再次使用html_entity_decode对其进行了解码,从而成功解码,但是在Web浏览器上它显示为: "<div></div>"该html将被打印在页面上。

我知道这与将HTML编码保存在db表中有关,对此没有任何想法。

谢谢

您似乎对实体进行了双重编码。 如果无法弄清楚,请发布PHP代码,但看起来您正在对已经由html-entity编码的字符串进行编码。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM