note 38858 added to function.setcookie

From: Date: Fri, 09 Jan 2004 05:54:21 +0000
Subject: note 38858 added to function.setcookie
Groups: php.notes 
Request: Send a blank email to php-notes+get-63185@lists.php.net to get a copy of this message
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. ---- Manual Page -- http://www.php.net/manual/en/function.setcookie.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+38858 Delete -- http://master.php.net/manage/user-notes.php?action=delete+38858&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+38858&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#63185) next »