|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-08-23 07:15 UTC] sniper@php.net
[2002-08-23 10:11 UTC] h_tr_dung at hotmail dot com
[2002-08-23 10:32 UTC] rasmus@php.net
[2002-08-23 10:50 UTC] h_tr_dung at hotmail dot com
[2002-08-23 10:57 UTC] rasmus@php.net
[2002-08-23 11:40 UTC] h_tr_dung at hotmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 12:00:01 2025 UTC |
I have tested the "baking" file (please see below) in two machines and received the same error: Warning: Cannot add header information - headers already sent by (output started at ...\setcookie.php:1) in ...\setcookie.php on line 2 The first system used: WinXP Pro., IIS (built-in with WinXP). The second system used: FreeBSD 4.6, Apache/1.3.26. The "baking" file's content: <?php setcookie ("Chip_Name",$Chip); echo "<BODY OnLoad=\" location='".$forwarding."' \">"; ?> The test file's content: <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <?php echo $Chip_Name; ?> <a href="setcookie.php?Chip=Chocolate&forwarding=<?php echo $PHP_SELF ?>">Test SetCookie() Function</a> </body> </html> Is it a bug?!? Or there is something wrong with my code?!? I couldn't even "bake" any cookie because some headers were sent first, but how could?