文档章节

验证是否手机打开

丶二蛋
 丶二蛋
发布于 2017/05/15 08:55
字数 183
阅读 1
收藏 0
function is_mobile() { 
    $user_agent = $_SERVER['HTTP_USER_AGENT']; 
    $mobile_agents = array("240x320","acer","acoon","acs-","abacho","ahong","airness","alcatel","amoi", 
    "android","anywhereyougo.com","applewebkit/525","applewebkit/532","asus","audio", 
    "au-mic","avantogo","becker","benq","bilbo","bird","blackberry","blazer","bleu", 
    "cdm-","compal","coolpad","danger","dbtel","dopod","elaine","eric","etouch","fly ", 
    "fly_","fly-","go.web","goodaccess","gradiente","grundig","haier","hedy","hitachi", 
    "htc","huawei","hutchison","inno","ipad","ipaq","iphone","ipod","jbrowser","kddi", 
    "kgt","kwc","lenovo","lg ","lg2","lg3","lg4","lg5","lg7","lg8","lg9","lg-","lge-","lge9","longcos","maemo", 
    "mercator","meridian","micromax","midp","mini","mitsu","mmm","mmp","mobi","mot-", 
    "moto","nec-","netfront","newgen","nexian","nf-browser","nintendo","nitro","nokia", 
    "nook","novarra","obigo","palm","panasonic","pantech","philips","phone","pg-", 
    "playstation","pocket","pt-","qc-","qtek","rover","sagem","sama","samu","sanyo", 
    "samsung","sch-","scooter","sec-","sendo","sgh-","sharp","siemens","sie-","softbank", 
    "sony","spice","sprint","spv","symbian","tablet","talkabout","tcl-","teleca","telit", 
    "tianyu","tim-","toshiba","tsm","up.browser","utec","utstar","verykool","virgin", 
    "vk-","voda","voxtel","vx","wap","wellco","wig browser","wii","windows ce", 
    "wireless","xda","xde","zte"); 
    $is_mobile = false; 
    foreach ($mobile_agents as $device) { 
        if (stristr($user_agent, $device)) { 
            $is_mobile = true; 
            break; 
        } 
    } 
    return $is_mobile; 
} 

 

© 著作权归作者所有

共有 人打赏支持
丶二蛋
粉丝 0
博文 3
码字总数 574
作品 0
石家庄
exchange2010安卓手机无法配置exchange邮件

今天朋友给我反馈了一个问题,他所在的公司所有安卓手机无法配置exchange邮箱,提示:"验证失败,请检查网络 连接或服务器设置”但是PC端outlook却没有问题。 经过各种方式验证,服务器的内网...

260791260
2017/06/18
0
0
Android 开发人员不得不收集的代码 (持续更新中)

README of English 为方便查找,已进行大致归类,其目录如下所示: Activity相关→ActivityUtils.java→Demo isActivityExists : 判断是否存在Activity launchActivity : 打开Activity getL...

android框架安卓
06/28
0
0
世纪互联版Office 365 MFA配置

Azure 多重身份验证 (MFA) 是 Microsoft 的双重验证解决方案,在国际版Office 365很早就可以实现,但是世纪互联版Office 365上该功能一直未更新。最近在研究世纪互联版Office 365时,发现此功...

ljb_job
2017/04/11
0
0
解锁Charles的姿势

Charles,作为mac开发的好基友,不知道大家是否对它的使用姿势了如指掌。相信很多童鞋只是熟悉几种简单的功能,今天为大家解锁几种高级姿势......希望能够帮到大家。 Charles是个啥 Charles是...

lucefer
2017/11/22
0
0
手机无法通过Active Sync连接Exchange Server

随着Exchange技术的日新月异,加上智能手机的飞速发展,现在有越来越多的用户喜欢用自己手机来配置自己的企业邮箱。通过Exchange Server的Active Sync功能,可能越来越方便的通过3G/4G/WIFI网...

技术小胖子
2017/11/16
0
0

没有更多内容

加载失败,请刷新页面

加载更多

秒杀网站系统设计详解

最近总有一些朋友问高并发问题,后来就想自己把一个秒杀系统作为例子详细分解一下,也是一个学习过程。 首先假设场景,预计该活动可能有1万人参加,那最大并发数为1万。 主要面对的问题分析:...

小海bug
25分钟前
2
0
TypeScript基础入门之装饰器(一)

转发 TypeScript基础入门之装饰器(一) 介绍 随着TypeScript和ES6中Classes的引入,现在存在某些场景需要额外的功能来支持注释或修改类和类成员。 装饰器提供了一种为类声明和成员添加注释和元...

durban
35分钟前
1
0
sed命令扩展使用操作

打印某行到某行之间的内容 假若文件test.txt的内容是: ertfff**[abcfd]123324444[rty]**fgfgf 怎么能截取 [abcfd]123324444[rty] 这一部分出来呢? 操作命令: 知道开始行和结...

野雪球
51分钟前
1
0
JVM内存笔记

Hotspot JVM 中的 Java 线程与原生操作系统线程有直接的映射关系。当线程本地存储、缓 冲区分配、同步对象、栈、程序计数器等准备好以后,就会创建一个操作系统原生线程。 Java 线程结束,原...

凌渡
57分钟前
1
0
284. Peeking Iterator

Description Tag: Design Difficulties: Medium Given an Iterator class interface with methods: next() and hasNext(), design and implement a PeekingIterator that support the pee......

52iSilence7
59分钟前
1
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部