分享一个检测用户是否用手机(Mobile)访问网站的 PHP 类_PHP教程
程序员文章站
2022-04-26 13:36:58
...
有一个基于MIT License协议开源的PHP程序
http://code.google.com/p/php-mobile-detect/
程序就是一个文件,下载之后直接引用就可以。
使用方法:
include("Mobile_Detect.php");
$detect = new Mobile_Detect();
if ($detect->isMobile()) {
// any mobile platform
echo 'isMobile';
}
else{
echo 'isPC';
}
?>
推荐阅读
-
php网站判断用户是否是手机访问的方法_PHP教程
-
php网站判断用户是否是手机访问的方法_PHP教程
-
php检测用户是否用手机(Mobile)访问网站的类_PHP教程
-
php检测用户是否用手机(Mobile)访问网站的类_PHP
-
分享一个检测用户是否用手机(Mobile)访问网站的 PHP 类
-
分享一个检测用户是否用手机(Mobile)访问网站的 PHP 类_PHP教程
-
php检测用户是否用手机(Mobile)访问网站的类_PHP教程
-
分享一个检测用户是否用手机(Mobile)访问网站的 PHP 类
-
php检测用户是否用手机(Mobile)访问网站
-
php检测用户是否用手机(Mobile)访问网站