how can I javascript decodeURI in PHP?

前端 未结 3 680
慢半拍i
慢半拍i 2021-01-05 20:58

I have a javascript which sends some specific information to a PHP api . Before to send it performs encodeURI . How can I \"decode\" it in PHP ? I understand that urldecode/

3条回答
  •  孤城傲影
    2021-01-05 21:13

    Use encodeURIComponent in Javascript: http://www.w3schools.com/jsref/jsref_encodeuricomponent.asp and urldecode in PHP: http://php.net/manual/en/function.urldecode.php

提交回复
热议问题