分享一个检测用户是否用(Mobile)接见网站的 PHP 类
添加时间:2013-8-9 点击量:
有一个基于MIT License和谈开源的PHP法度
http://code.google.com/p/php-mobile-detect/
法度就是一个文件,之后直接引用就可以。
应用办法:
<?php
include(Mobile_Detect.php);
¥detect = new Mobile_Detect();
if (¥detect->isMobile()) {
// any mobile platform
echo isMobile;
}
else{
echo isPC;
}
?>