//执行SQL语句if(mysql_query($sql))
{
echo'var recorded = true; alert($ip);';
//设定Cookie值,设置1天后失效setcookie("visited",true,time()+3600*24);
}
else//插入失败 {
echo'var recorded = false; alert($ip);';
//设定Cookie值,失效时间为过去,即删除该Cookiesetcookie("visited",false,time()-3600*24);
}
这是我编写的一段代码..错误是在stecookie前使用了echo,虽然有错误,但是不影响使用... 错误提示: <b>Warning </b>: Cannot modify header information - headers already sent by (output started at xxx.php:32) in <b>xxx.php </b> on line <b>34 </b> <br />