其他分享
首页 > 其他分享> > 让安卓用户跳转出微信

让安卓用户跳转出微信

作者:互联网

<?php

$userAgent = $_SERVER['HTTP_USER_AGENT']; //获取浏览器信息

if (!strpos($userAgent, 'MicroMessenger')) {

echo '这里是微信外面';
}else if(strpos(strtolower($userAgent), 'android')||strpos($userAgent, 'adr')){

header('Content-type: application/vnd.ms-word;charset=utf-8');
header('Content-Disposition:attachment; filename="/Content/1.docx"');

}else {

echo '这里是苹果';

}

标签:出微信,安卓,echo,Content,header,strpos,跳转,userAgent,else
来源: https://www.cnblogs.com/tyqing/p/11936128.html