php 判断手机访问还是pc访问
来源:互联网 发布:log4j2 日志数据库 编辑:程序博客网 时间:2024/05/17 06:47
<?phpfunction is_mobile(){ // returns true if one of the specified mobile browsers is detected // 如果监测到是指定的浏览器之一则返回true $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.="jig\s browser|hiptop|^ucweb|^benq|haier|^lct|opera\s*mobi|opera\*mini|320x320|240x320|176x220"; $regex_match.=")/i"; // preg_match()方法功能为匹配字符,既第二个参数所含字符是否包含第一个参数所含字符,包含则返回1既true return preg_match($regex_match, strtolower($_SERVER['HTTP_USER_AGENT']));}if ( is_mobile() ) {header('Location:jiexin/client/client.html');}else {header('Location:jiexin/web/web.html');}?>
0 0
- php 判断手机访问还是pc访问
- 判断是手机访问还是PC访问
- 百度判断手机访问还是PC访问
- php判断访问来源是PC还是手机端
- 判断访问终端是手机还是PC
- PHP判断是手机移动端访问还是PC端访问的函数
- 服务器端判断是PC访问还是手机访问
- 网页判断是手机访问还是PC访问
- 服务器端判断是PC访问还是手机访问
- 服务器端判断是PC访问还是手机访问
- 通过UserAgent判断是手机访问还是PC访问
- C#判断用户是手机访问还是PC访问
- php 识别是pc访问还是手机端访问网站
- php 识别是pc访问还是手机端访问网站
- pc、手机访问判断
- PHP判断电脑还是手机访问
- php判断是手机还是pc访问从而走不同url
- java web判断手机还是pc机访问
- PowerShell: 远程调用
- delphi正则表达式学习笔记(三)
- C#: 字符串连接 (+=) 与 StringBuilder 效率分析
- 求道智慧课堂 让课堂手机不再泛滥! 开发侧记(一)
- java之JUC系列-外部Tools-Executors|Semaphor|Exchanger|CyclicBarrier|CountDownLatch
- php 判断手机访问还是pc访问
- SQL Server: 删除 XML 字段的某个节点
- Struts2多文件上传错误解决
- ADFS 概念与基本开发介绍 (1)
- 安装oracle11g时,Enterprise Manager配置成功,出现以下警告……
- C#: 双检锁 (Double Checked Locking)
- Office Delve 初窥 - What is Office Delve?
- 顺序队列
- 常用SQL查询语句 Oracle中Union,Union All,Intersect,Minus的有什么区别