url传递base64加密串时,“+”会在url编码中视为空格,解密就会失败
解决方法,base64加密后替换“+”“/”,解密前再替换回去。。。
$str = str_replace('-','+',$str);
$str = str_replace('_','/',$str);
url传递base64加密串时,“+”会在url编码中视为空格,解密就会失败
解决方法,base64加密后替换“+”“/”,解密前再替换回去。。。
$str = str_replace('-','+',$str);
$str = str_replace('_','/',$str);