哪位大仙在模板文件里使用过默认的is_mobile函数

极客主题2022-01-20  655

主要用来判断终端设备,以显示不同的前端代码。

转载请注明原文地址:https://www.wellcms.net/read-132.html
00
最新回复(2)
  • 搞错方向了,is_mobile 判断函数是不是11位的手机号码。

    使用这个
    $device = get_device();

    返回 0:PC端 / 1:微信端 / 2:平板端 / 3:手机端
    回复00
  • 是的一时大意没细看。
    get_device()函数在misc.func.php里第646行

    示例代码1:theme.func.php第25行
    // 0:pc 1:wechat 2:pad 3:mobile
        $detect = get_device();
    回复00