<?php
include "some.php";//that s for mysql_connect
session_start();
$uid=$_REQUEST['uid'];
//main blocking
if(isset($_COOKIE['mainblocking'])){echo '1';}else{echo '2';}
....
每次抛出 2;我用那个 php 文件设置 cookie
<?php
setcookie("mainblocking", "1", time()+3600) or die("yeah");
?>
谁能告诉我这段代码有什么问题以及我缺乏什么知识,有趣的是它在那个代码中抛出了 1
<?php
if(isset($_COOKIE['mainblocking'])){echo '1';}else{echo 2;}
?>