php检测用户是否用手机(Mobile)访问网站的类
时间:2021-04-01 08:16:49|栏目:PHP代码|点击: 次
下载地址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';
}
?>
栏 目:PHP代码
下一篇:PHP脚本数据库功能详解(下)
本文标题:php检测用户是否用手机(Mobile)访问网站的类
本文地址:http://www.codeinn.net/misctech/92062.html






