首页 >后端开发 >php教程 >php判断客户端是否为手机_PHP教程

php判断客户端是否为手机_PHP教程

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB原创
2016-07-13 17:49:04924浏览

//php判断客户端是否为手机  
$agent = $_SERVER['HTTP_USER_AGENT']; 
if(strpos($agent,"NetFront") || strpos($agent,"iPhone") || strpos($agent,"MIDP-2.0") || strpos($agent,"Opera Mini") || strpos($agent,"UCWEB") || strpos($agent,"Android") || strpos($agent,"Windows CE") || strpos($agent,"SymbianOS")) 
header("Location:xxxxxxxx"); 
?> 

摘自 chaojie2009的专栏

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/478375.htmlTechArticle?php //php判断客户端是否为手机 $agent = $_SERVER[HTTP_USER_AGENT]; if(strpos($agent,NetFront) || strpos($agent,iPhone) || strpos($agent,MIDP-2.0) || strpos($agent,Opera Mi...
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn