php中的cookie的问题
php程序:<?php
if(!isset($id)){
srand((double)microtime()*1000000);
$randvalue=rand();
setcookie("id",$randvalue,time()+120);
}
// echo "<HTML>\n";
// echo "<HEAD>\n";
?>
<html>
<head>
<title></title>
</head>
<body>
<?
echo $HTTP_Cookie_VARS["id"];
?>
</body>
</html>
运行:
Warning: Cannot add header information - headers already sent by (output started at C:\Program Files\Apache Group\Apache\htdocs\ff.php:1) in C:\Program Files\Apache Group\Apache\htdocs\ff.php on line 5
不是已经将setcookie放在最前面了吗?
郁闷死了!
救命!
你前面有没有东西?
连空格回车都不能有~~
页:
[1]