0

我只在 Firefox 中遇到 cookie 问题

这就是我在 .htaccess 中所拥有的

DirectoryIndex index.php

在我的 index.php 中:

if (!isset($_COOKIE['SplashScreen']))
{
  setcookie('SplashScreen', '1',  time()+60*60*24*30,'/');
  header("Location: splash.html");
}

在我的 splash.html 我有:

<area href="/index.php" coords="944,354,950,354,954,352,957,349,962,347,963,351,961,356,960,360,962,365,967,370,968,375,972,379,977,381,983,383,990,385,996,385,1002,385,1008,384,1010,381,1013,379,1017,377,1021,383,1020,387,1017,392,1013,399,1011,402,1008,401,1008,399,1008,395,1006,392,1003,390,1001,390,998,389,997,392,997,396,998,400,995,403,992,404,990,407,988,410,985,413,983,415,981,417,979,419,977,421,974,424,971,426,967,429,965,434,966,439,965,443,964,446,964,450,961,452,958,455,956,458,952,457,950,451,949,447,947,443,944,438,943,433,941,429,939,424,938,419,939,414,939,409,938,404,936,403,934,407,931,409,926,407,924,403,927,401,921,397,923,394,929,395,930,392,928,387,926,384,928,381,934,379,938,375,943,372,946,367,947,362,946,358" shape="poly">

在 Firefox 中,cookie 被创建但保留在同一个 splash.html 中,当我们单击该区域时,其他浏览器会重定向到 index.php。

除Firefox外,所有其他浏览器都支持该逻辑。

4

0 回答 0