php判断字符串是否base64编码

//判断字符串是否是base64编码
方法一
pubclic function base64($str)
{
     return $str = = base64_encode(base64_decode($str)) ? true : false;
    
    
}
方法二:
if($member['nickname'] == base64_encode(base64_decode($member['nickname'])))
{
$member['nickname'] = base64_decode(($member['nickname']));
}
 

 

posted @ 2019-11-04 11:27  大熊童鞋  阅读(3380)  评论(0编辑  收藏  举报