手机访问pc网站自动跳转手机端网站PHP代码

 
$agent = $_SERVER['HTTP_USER_AGENT'];
if(strpos($agent,"comFront")  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:http://chinahoby");
原文地址:https://www.cnblogs.com/zgzy/p/4054624.html