php 压缩字符串
时间:2019-07-10 17:29:24
收藏:0
阅读:174
压缩字符串:
base64_encode(gzcompress(serialize($data)))
解压字符串:
unserialize(gzuncompress(base64_decode($search_cache[‘data‘])));
判断是否是base64:
function is_base64($str) {
return $str == base64_encode(base64_decode($str)) ? true : false;
}
原文:https://www.cnblogs.com/peipeiyu/p/11165119.html
评论(0)