<?php
#php判断微信还是支付宝
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') == true) {
$browser = '微信浏览器';
} else if (strpos($_SERVER['HTTP_USER_AGENT'], 'AlipayClient') == true) {
$browser = '支付宝浏览器';
} else {
$browser = "不是微信和支付宝";
}
#判断支付方式
if ($browser == "微信浏览器"){
header('Refresh: 0; url=http://dtxb.zjyhj/weice');
}elseif ($browser == "支付宝浏览器"){
header('Refresh: 0; url=http://132.232.102.218/alipay/pay.html');
}else{
echo "请用支付宝和微信支付";
}
?>
<?php
#php判断微信还是支付宝
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') == true) {
$browser = '微信浏览器';
} else if (strpos($_SERVER['HTTP_USER_AGENT'], 'AlipayClient') == true) {
$browser = '支付宝浏览器';
} else {
$browser = "不是微信和支付宝";
}
#判断支付方式
if ($browser == "微信浏览器"){
header('Refresh: 0; url=http://dtxb.zjyhj/weice');
}elseif ($browser == "支付宝浏览器"){
header('Refresh: 0; url=http://132.232.102.218/alipay/pay.html');
}else{
echo "请用支付宝和微信支付";
}
?>