相关疑难解决方法(0)

简单的智能手机检测

好的我已经看过几个可以识别所有手机的移动检测脚本,有人想出一个简单的智能手机检测脚本吗?

我正在使用jQueryMobile框架并想要基于设备的主题,我是否会以错误的方式进行此操作,或者是否有任何可以提供的提示?

智能手机的定义是什么?

我所见,但我认为是智能手机检测的复杂方式:

我喜欢这个功能,但仍需要减少:

/**
 * A simple class used to detect whether page<br>
 * is being viewed from a mobile device or not.
 * @copyright 2010 Covac Software
 * @author Christian Sciberras
 * @version 01/05/2010
 */
class Mobile {
    public static function is_mobile(){
        $user_agent = $_SERVER['HTTP_USER_AGENT']; // get the user agent value - this should be cleaned to ensure no nefarious input gets executed
        $accept     = $_SERVER['HTTP_ACCEPT']; …
Run Code Online (Sandbox Code Playgroud)

php user-agent smartphone mobile-devices jquery-mobile

6
推荐指数
1
解决办法
1万
查看次数