开发者

Best Way To Encode and Decode Text PHP

开发者 https://www.devze.com 2022-12-27 02:43 出处:网络
I\'m looking for a method in which I can decode and e开发者_运维百科ncode text to be passed in a url.

I'm looking for a method in which I can decode and e开发者_运维百科ncode text to be passed in a url.

Not base64

Any others?


You could try:

  • rawurlencode
  • urlencode
  • convert_uuencode
  • quoted_printable_encode

(and their respective decode routines) or a handful of other options. Without a little more knowledge as to the use case you are trying to solve, though, answers will be lethargic or vague.


PHP has two functions: urlencode() and urldecode(). Perhaps they are of use to you.

What exactly do you mean decode/encode text to be passed in a URL? If you're looking for a way to pass 'secret' data, using GET parameters is not the right way to do it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号