php实现扫描二维码根据浏览器类型访问不同下载地址
时间:2020-12-12 09:42:52|栏目:PHP代码|点击: 次
<?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']."'");
}
?>
上一篇:destoon之一键登录设置
栏 目:PHP代码
本文标题:php实现扫描二维码根据浏览器类型访问不同下载地址
本文地址:http://www.codeinn.net/misctech/31989.html






