php判断微信还是支付宝

php判断 strpos($_SERVER['HTTP_USER_AGENT']== ‘MicroMessenger’ 是微信 ; strpos($_SERVER['HTTP_USER_AGENT']== ‘AlipayClient’ 是支付宝 if (strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') !== false) { //微信echo '微信';exit;}else if(strpos($_SERVER['HTTP_USER_AGENT'], 'AlipayClient') !== false){//echo '支付宝浏览';echo '支付宝';exit;}else{echo "不是微信或者支付宝";exit;}

你可能感兴趣的:(php)