Convert both the client and server in case of uppercase and lowercase. PHP & nbsp; base64 & nbsp; has different encoding methods. for example, if the server is & nbsp; aGVsbG8 = then the client is & nbsp; agvSBg8 = & nbsp; how can I convert the case sensitivity? My current practice is to traverse each byte and convert each other in uppercase and lowercase letters.
Currently, PHP base64 encoding on the client and server is different.
For example, the server is aGVsbG8 =
Then the client is AgvSBg8 = how can I convert the case sensitivity?
My current practice is to traverse the ASCII code of each byte, determine the size, and then decide to add or subtract 32
------ Solution --------------------
Print preg_replace ('/([a-z] *) ([A-Z] *)/E', "strtolower (' \ $2 '). strtoupper ('\ $ 1') ", $ string );
------ Solution --------------------
At the end of this post, xuzuning edited A binary internal code as 01000001 at 11:18:53 on
The binary inCode of a is 01100001.
The space binary inCode is 00100000.
Therefore, letters and spaces are case-insensitive.
It can be seen how intelligent the founder of ASCII code is!