问题
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 function in php to Javascript's decodeURIComponent()
?
回答1:
urldecode()
However you do not need to use it on $_REQUEST variables, which are already decoded automatically.
来源:https://stackoverflow.com/questions/3896591/what-is-the-equivalent-of-javascripts-decodeuricomponent-in-php