<?php
if (!isset($_COOKIE['firsttime']))
{
setcookie("firsttime", "no", time()+1500);
?>
<div class="row-fluid">
<div class="span4 center">
</div>
<div class="span4 center">
<div style="">
<div class="alert alert-info">
<button type="button" href="<?php setcookie("firsttime", "no", time()+1500); ?>" class="close" data- dismiss="alert">×</button>
<strong>Welkom</strong> <br />Dit is je eerste bezoek op wijktoernooi.nl ! <br /> Wil je je direct registreren? Klik hier!
</div>
</div>
</div>
<div class="span4 center">
</div>
</div>
<?php
}
else
{
// do or show nada !
}
?>
根据上面的代码,如果没有设置 cookie,它应该首先设置 cookie 并显示警报框
但它没有....当我重新加载页面时,我仍然看到警告框,我在哪里犯了错误?