文档章节

验证是否手机打开

丶二蛋
 丶二蛋
发布于 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
解锁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
使用Xposed去除微博国际版的启动广告

本文同步更新于旺仔的个人博客,访问可能有点慢,多刷新几次。 前面有篇文章已经介绍了如何创建Xposed模块的文章了,这篇就让我们来实现一个简单的去除启动广告的功能吧。 起因 为什么要是要...

叫我旺仔
2017/10/08
0
0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

JS:异步 - 面试惨案

为什么会写这篇文章,很明显不符合我的性格的东西,原因是前段时间参与了一个面试,对于很多程序员来说,面试时候多么的鸦雀无声,事后心里就有多么的千军万马。去掉最开始毕业干了一年的Jav...

xmqywx
今天
0
0
Win10 64位系统,PHP 扩展 curl插件

执行:1. 拷贝php安装目录下,libeay32.dll、ssleay32.dll 、 libssh2.dll 到 C:\windows\system32 目录。2. 拷贝php/ext目录下, php_curl.dll 到 C:\windows\system32 目录; 3. p...

放飞E梦想O
今天
0
0
谈谈神秘的ES6——(五)解构赋值【对象篇】

上一节课我们了解了有关数组的解构赋值相关内容,这节课,我们接着,来讲讲对象的解构赋值。 解构不仅可以用于数组,还可以用于对象。 let { foo, bar } = { foo: "aaa", bar: "bbb" };fo...

JandenMa
今天
1
0
OSChina 周一乱弹 —— 有人要给本汪介绍妹子啦

Osc乱弹歌单(2018)请戳(这里) 【今日歌曲】 @莱布妮子 :分享水木年华的单曲《中学时代》@小小编辑 手机党少年们想听歌,请使劲儿戳(这里) @须臾时光:夏天还在做最后的挣扎,但是晚上...

小小编辑
今天
21
5
centos7安装redis及开机启动

配置编译环境: sudo yum install gcc-c++ 下载源码: wget http://download.redis.io/releases/redis-3.2.8.tar.gz 解压源码: tar -zxvf redis-3.2.8.tar.gz 进入到解压目录: cd redis-3......

hotsmile
今天
2
0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

返回顶部
顶部