Re: What's up with Cookies on Windows

From: Date: Tue, 16 Jan 2001 22:21:25 +0000
Subject: Re: What's up with Cookies on Windows
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-5055@lists.php.net to get a copy of this message
Joey Garcia <jgarcia@mobilize.com> said: > Warning: Cannot add header information - headers already sent by (output > started at c:\program files\apache group\apache\htdocs\class\cookie.php:2) > in c:\program files\apache group\apache\htdocs\class\cookie.php on line 3 > > <?php > setcookie("myCookie","test",date("l, d-M-y H:i:s", > (mktime()+1800)),"/","",0); > ?> > If the failing header is at line 3, then your PHP code block starts at line 2. That means you have a blank line before it. That's output. And as you've already learned, you can't send output before SetCookie() or header()... adam

« previous php.windows (#5055) next »