【发布时间】:2014-08-14 08:08:16
【问题描述】:
在我的 php 文件中我有这个..
if ( isset($_COOKIE['test']) ){
setcookie("test", "testesttest", time()+3600*24*80);
}
ob_start();
echo 'autotrackphpre';
Header( "HTTP/1.1 301 Moved Permanently" );
header("Location: $url");
ob_flush();
当你调用 php 文件时这是一个重定向.. 如果你先调用它,它会设置 cookie..
但是第二次加载.. cookie 得到更新... 那是我不想要的。
如果 cookie 存在,则什么也不做。
格
【问题讨论】:
-
if (!isset())那么?