What is the equivalent of JavaScript's decodeURIcomponent in PHP?

前端 未结 2 1768
深忆病人
深忆病人 2021-02-06 21:10

I have a string with unicode characters that I am transferring via HTTP. This string was encoded with Javascript\'s encodeURIcomponent(). Is there an equivalent fu

相关标签:
2条回答
  • 2021-02-06 21:30

    rawurldecode() which does not decode plus to space charactor

    0 讨论(0)
  • 2021-02-06 21:47
    urldecode()
    

    However you do not need to use it on $_REQUEST variables, which are already decoded automatically.

    0 讨论(0)
提交回复
热议问题