PHP中是否可以编码特殊字符,以便可以在URL中使用它们? [英] Is there a way in PHP to encode special characters so they can be used in an URL?
本文介绍了PHP中是否可以编码特殊字符,以便可以在URL中使用它们?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个像这样的AES加密来的字符串->,±«〜-ÄÔý3ƒÛœÛ
是否可以编码此字符串,以便可以通过URL将其传输到脚本?
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?
谢谢!
推荐答案
您可以将urlencode或base64_encode用于该任务,都将产生网址安全字符串
you can use urlencode or base64_encode for that task, both will produce url safe strings
这篇关于PHP中是否可以编码特殊字符,以便可以在URL中使用它们?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文