php检测用户是否用手机(Mobile)访问网站的类

内容摘要
下载地址http://code.google.com/p/php-mobile-detect/
程序就是一个文件,下载之后直接引用就可以,基于MIT License协议开源的PHP程序
使用方法:复制代码 代码如下:<?phpinclud
文章正文

下载地址http://code.google.com/p/php-mobile-detect/

程序就是一个文件,下载之后直接引用就可以,基于MIT License协议开源的PHP程序

使用方法:

复制代码 代码如下:

<?php
include("Mobile_Detect.php");
$detect = new Mobile_Detect();

if ($detect->isMobile()) {
    // any mobile platform
    echo 'isMobile';
}
else{
    echo 'isPC';
}
?>


代码注释

作者:喵哥笔记

IDC笔记

学的不仅是技术,更是梦想!