// 判断是否是手机端
if(WAP_URL !=""){
$ua = @$_SERVER['HTTP_USER_AGENT'];
if(preg_match('/(iphone|android|Windows\sPhone)/i', $ua)){
$lian_redirect="";
if (isset($_GET['invit'])) {
$invit = $_GET['invit'];
$user = M('User')->where(array('invit' => $invit))->find();
if ($user['id']) {
$lian_redirect = WAP_URL."/Login/register/invit/".$user['id'];
}else{
$lian_redirect = WAP_URL;
}
}else{
$lian_redirect = WAP_URL;
}
header("Location:".$lian_redirect);
die();
}
}
php 判断访问的是否是手机端
最新推荐文章于 2024-01-22 14:33:10 发布