【问题标题】:html entities to characters through http headerhtml实体通过http头转字符
【发布时间】:2015-12-16 09:51:33
【问题描述】:

有没有什么方法可以在不使用任何实体解码器功能(如 html_entity_decode,我的意思是设置 http 标头)的情况下将 html 实体转换为字符?

要求:我有一个网页被重定向到另一个带有一些参数的新网页。参数值包含一些 html 字符,例如“要在页面上显示,但它显示为”而不是“。我不想在第二页上使用 html_entity_decode。

【问题讨论】:

    标签: php http-headers html-entities


    【解决方案1】:

    您正在寻找:

     http://php.net/manual/en/function.urlencode.php
     http://php.net/manual/en/function.urldecode.php
    

    解决问题

    【讨论】:

    • 不,这不能解决我的问题。我已经在使用 urlencode、urldecode。我在重定向到它被解码的第二页上的第二页之前对 url 进行编码。
    猜你喜欢
    • 1970-01-01
    • 2017-11-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-09-12
    • 2013-10-29
    • 1970-01-01
    • 2023-03-30
    相关资源
    最近更新 更多