问题
I have a string that comes from an AES encryption like this -> "‚±«~—ÄÔý 3ƒÛœÛ" Is there a way to encode this string so it can be transmitted to a script via URL?
Thank You!
回答1:
you can use urlencode or base64_encode for that task, both will produce url safe strings
回答2:
Yes!
Use the global function
urlencode($string)
If you want to get the original paramters you can decode the URL-Parameters with:
urldecode($string)
来源:https://stackoverflow.com/questions/15011680/is-there-a-way-in-php-to-encode-special-characters-so-they-can-be-used-in-an-url