首页 > 开发 > PHP > 正文

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

2024-05-04 22:18:26
字体:
来源:转载
供稿:网友
<?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{//不确定是什么系统或者是pcheader("Location: ".$GLOBALS["public_appconfig"]["app"]['android']."'");}?>
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表