Skip to content

Commit

Permalink
Create index.php
Browse files Browse the repository at this point in the history
  • Loading branch information
likeyun committed Oct 30, 2021
1 parent d1f62a3 commit 44fb953
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,14 @@
}
}else if($dwz_type == '3') {
if(strpos($_SERVER['HTTP_USER_AGENT'],'MicroMessenger') === false) {
echo '<title>正在跳转</title>';
$agent_pc = strtolower($_SERVER['HTTP_USER_AGENT']);
$is_pc = (strpos($agent_pc, 'windows nt')) ? true : false;
if($is_pc){
echo '<title>温馨提示</title>';
echo "<br/><br/><br/><br/><br/><img src='./images/warning.png' style='width:120px;height:120px;display:block;margin:20px auto;' /><p style='text-align:center;color:#666;'>该页面只能在手机浏览器打开</p>";
exit;
}
echo '<title>正在跳转</title>';
echo '<script>location.href="'.$dwz_url.'";</script>';
}else{
echo '<title>温馨提示</title>';
Expand Down Expand Up @@ -189,4 +196,4 @@
}
$conn->close();
}
?>
?>

0 comments on commit 44fb953

Please sign in to comment.