阅读背景:

php实现扫描二维码根据浏览器类型访问不同下载地址

来源:互联网 

!--NEWSZW_HZH_BEGIN--

<?php
$Agent = $_SERVER["HTTP_USER_AGENT"];
preg_match("/android|iphone/i",$Agent,$matches);
if (strtolower($matches[0]) == "android") {
// echo "安卓";
header("Location: ".$GLOBALS["public_appconfig"]["app"]["android"].""");
} elseif (strtolower($matches[0]) == "iphone") {
header(""Location: ".$GLOBALS["public_appconfig"]["app"]["ios"].""");
}else{
//不肯定是甚么体系或是pc
header("Location: ".$GLOBALS["public_appconfig"]["app"]["android"].""");
}
?>
<?php
$Agent = $_SERVE




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: