判断是否是微信浏览器

function is_wechat()
{
    $ug= isset($_SERVER['HTTP_USER_AGENT'])?$_SERVER['HTTP_USER_AGENT']:'';
    if( stripos($ug,'micromessenger') !== false ){
        return true;
    }
    return false; 
 }

  

posted @ 2019-08-26 11:11  X__cicada  阅读(156)  评论(0编辑  收藏  举报