首页 开发指南

/*根据文件位置更改路径信息*/
require_once ‘Mobile_Detect.php’;
$detect = new Mobile_Detect;
if($detect->isMobile()) {
header(‘Location: http://m.uncletoo.com/’);
exit;
}
这是定向到移动网站,下面还有其他形式的重定向:
//所有平板设备
if( $detect->isTablet()) {
}
//是移动但非平板设备
if( $detect->isMobile() && !$detect->isTablet()) {
}
//IOS系统
if( $detect->isiOS()) {
}
//Android系统
if( $detect->isAndroidOS()) {
}
//WindowsPhone系统
if( $detect->isWindowsPhoneOS()) {
}

回复 村上桐树 取消回复

您的电子邮箱地址不会被公开。 必填项已用*标注

会员评论:(2)

声明:本站所有主题/文章除标明原创外,均来自网络转载,版权归原作者所有,如果有侵犯到您的权益,请联系本站删除,谢谢!
©www.sbmzenith.com 2013-2022 All Rights Reserved.
豫ICP备15009393号