function is_mobile()
{
$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
$uachar = "/(nokia|sony|ericsson|mot|samsung|sgh|lg|philips|panasonic|alcatel|lenovo|cldc|midp|mobile)/i";
if(($ua == '' || preg_match($uachar, $ua)))
{
return true;
}
}
判断手机段或移动端
最新推荐文章于 2022-03-19 16:32:44 发布