好的,所以我有 maconbeercompany.com,上面有一个年龄验证重定向。它在 IE、Chrome、Safari 和 Firefox 中运行良好。唯一的问题是我无法让它与移动设备一起使用。在 iphone 或 android 上,除非我点击“否”,否则我无法离开年龄验证页面。我希望用户能够点击“是”并访问啤酒公司的网站。下面是代码。我究竟做错了什么?
<?php
// This code, including the enclosing ?php tags, will require age verification for this page if included at the beginning of the associated HTML/PHP file.
session_start();
if (!isset($_SESSION['age_verified']) || $_SESSION['age_verified'] != true)
{
// Direct them to the age verification page
$redirect_url = urlencode("http://" . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'] );
header('Location: http://maconbeercompany.com/age-verification.php?redirect=' . $redirect_url );
}
?>
谢谢你的帮助!