Re: I get "headers already sent by" error each time I use setcookie function
| From: | In�rcia Sensorial Trabalhando | Date: | Thu, 23 Aug 2001 19:50:43 +0000 |
| Subject: | Re: I get "headers already sent by" error each time I use setcookie function | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-64169@lists.php.net to get a copy of this message | ||
It will fail if the first line is a blank line. For example (numbers are
line numbers):
1.
2.<?php
3. setcookie(); // etc...
4.?>
While:
1.<?php
2. setcookie(); // etc...
3.?>
It should work...
--
Julio Nobrega
A hora está chegando:
http://toca.sourceforge.net
"Ha Minh Nguyen" <haminh.nguyen@cgey.com> wrote in message
news:006701c12bbd$49a2bda0$a6ba430a@telecom.capgemini.fr...
Hi,
I don't know why I get :
"Warning: Cannot add header information - headers already sent by (output
started at c:\windows\bureau\cookie1.php:2) in c:\windows\bureau\cookie1.php
on line 6"
message
each time I use setcookie function.
The second line is : <?php
I put <html> at the end of the file.
Do you have any ideas ?
Thank you,
Ha Minh NGUYEN