/** * 判断是否手机访问 */ function is_mobile(){ if(preg_match('/(iphone|ipad|ipod|android)/i', strtolower($_SERVER['HTTP_USER_AGENT']))){ return true; }else{ return false; }