note 38858 rejected from function.setcookie by didou
| From: | didou@php.net | Date: | Fri, 09 Jan 2004 08:58:29 +0000 |
| Subject: | note 38858 rejected from function.setcookie by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-63187@lists.php.net to get a copy of this message | ||
Note Submitter: gravy_2004@hotmail.com
----
i know that the ssetcookies function should be called b4 any tags or other function, then i just do
it so. but it display nothing but
"setcookie("cuky_info","cuki_data",0,"","",0);" on
the webpage.
Later on, i try the following code:
------------------------------------------------
<html>
<?php
ob_start();
setcookie("cuky_info","cuki_data",0,"","",0);
ob_end_flush();
?>
</html>
------------------------------------------------
but it display folowing error this time:
Warning: Cannot modify header information - headers already sent by (output started at
C:\Inetpub\wwwroot\tri\setcuki.php:3) in C:\Inetpub\wwwroot\tri\setcuki.php on line 6
can anyone tell me whether it is due to my browser's setting or mistakes in my code. thx in
advance.