Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在寻找一种方法,我可以在其中解码和编码要在 url 中传递的文本。
不是base64
还有其他人吗?
你可以试试:
rawurlencode
urlencode
convert_uuencode
quoted_printable_encode
(以及它们各自的解码例程)或其他一些选项。但是,如果对您尝试解决的用例没有更多的了解,答案将是昏昏欲睡或含糊不清。
PHP 有两个函数:urlencode()和urldecode()。也许它们对你有用。
您到底是什么意思解码/编码要在 URL 中传递的文本?如果您正在寻找一种传递“秘密”数据的方法,那么使用 GET 参数不是正确的方法。