#1 xoYu
目前能想到的是launch扩展点。有没有人做过 给个思路。
感谢。
2014-04-23 11:56:27
2014-04-23 11:56:27
function is_mobile(){
// 判断是否是手机浏览器
$regex_match="/(nokia|iphone|android|motorola|^mot-|softbank|foma|docomo|kddi|up.browser|up.link|";
$regex_match.="htc|dopod|blazer|netfront|helio|hosin|huawei|novarra|CoolPad|webos|techfaith|palmsource|";
$regex_match.="blackberry|alcatel|amoi|ktouch|nexian|samsung|^sam-|s[cg]h|^lge|ericsson|philips|sagem|wellcom|bunjalloo|maui|";
$regex_match.="symbian|smartphone|midp|wap|phone|windows ce|iemobile|^spice|^bird|^zte-|longcos|pantech|gionee|^sie-|portalmmm|";
$regex_match.="jigs browser|hiptop|^ucweb|^benq|haier|^lct|operas*mobi|opera*mini|320x320|240x320|176x220";
$regex_match.=")/i";
return isset($_SERVER[HTTP_X_WAP_PROFILE]) or isset($_SERVER[HTTP_PROFILE]) or preg_match($regex_match, strtolower($_SERVER[HTTP_USER_AGENT]));
}
function is_wx(){ //微信浏览器
$userAgent = $_SERVER['HTTP_USER_AGENT'];
if(strpos($userAgent,"MicroMessenger")){
return true;
}else{
return false;
}
}
2014-04-23 12:40:45
skyzong 发表于 2014-4-23 12:40
我的做法是弄个函数:
2014-04-23 13:04:16
2014-04-23 13:39:08