public function _initialize()
{
$agent = $_SERVER['HTTP_USER_AGENT'];
$toUrl = '';//页面跳转的页面-》移动端页面
if(strpos($agent,"comFront") || strpos($agent,"iPhone") || strpos($agent,"MIDP-2.0") || strpos($agent,"Opera Mini") || strpos($agent,"UCWEB") || strpos($agent,"Android") || strpos($agent,"Windows CE") || strpos($agent,"SymbianOS"))
header("Location:$toUrl");
}
手机访问PC页面时自动跳转到移动端页面
最新推荐文章于 2024-07-23 04:00:22 发布