douyi6755 2017-06-09 12:07
浏览 20
已采纳

如何检查用户的平台symfony / PHP

I would like to know how to check if a user is connecting from a computer, or from a Phone. I'm using Symfony(Latest) and of course PhpPoo. I tried to use PHP_OS, but there is too much choice, and "home-made function" are not optimized.

The fact is that if the user is conneting to my website from a computer, i won't be able to access to it, but if it's from a mobile phone, i will be able.

Thanks :)

  • 写回答

1条回答 默认 最新

  • douji1999 2017-06-10 08:48
    关注

    I usually use the MobileDetect library for detecting the device and supported features of the client.

    There is a convenient Symfony integration: MobileDetectBundle

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
  • ¥50 STM32单片机传感器读取错误
  • ¥15 (关键词-阻抗匹配,HFSS,RFID标签天线)
  • ¥15 机器人轨迹规划相关问题
  • ¥15 word样式右侧翻页键消失