php检测用户是否用手机(Mobile)访问网站的类
更新时间:2014年01月09日 16:16:13 作者:
php检测用户是否用手机(Mobile)访问网站的类,引入这个类就可以直接使用了,程序基于MIT License协议开源,使用方法在下面
下载地址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';
}
?>
相关文章
单一index.php实现PHP任意层级文件夹遍历(Zjmainstay原创)
本程序实现了使用一个index.php文件来实现所有文件夹的遍历效果,避免了需要无穷复制index.php至文件夹下才能实现的效果2012-07-07


最新评论