On the server side, the PHP code will use the function urldecode()to decode, but the JavaScript code is responsible for encoding the URL. Which of the following JavaScript functions is compatible with the PHP function urldecode():
urldecode()
escape ()encodeURI ()encodeURIComponent ()
You can use either encodeURIor encodeURIComponent. The php manual says:
encodeURI
encodeURIComponent
Decodes any% ## encoding in a given string.
, , , %## . , JavaScript .
%##
( Gumbo, ?)
php urldecode + ( ). , , , php, encodeURIComponent, . + %2B, php urldecode.
urldecode
+
%2B