RE: [PHP] setcookie() in 4.2.0
| From: | Matthew Walker | Date: | Sat, 11 May 2002 14:17:00 +0000 |
| Subject: | RE: [PHP] setcookie() in 4.2.0 | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-97119@lists.php.net to get a copy of this message | ||
Yes. Output buffering is good.
Some people will say that you shouldn't use it, but should make sure to
write all your code so that there can't be any output before any headers
need to be sent. I disagree with this. While a good idea in principle,
in practice it is all but impossible to keep going.
(Or maybe I'm just too lazy to take the tremendous amount of time it
would take to rewrite our code to not send output before headers...)
Matthew Walker
Senior Software Engineer
ePliant Marketing
-----Original Message-----
From: Olexandr Vynnychenko [mailto:supaboy@i.com.ua]
Sent: Saturday, May 11, 2002 6:35 AM
To: php-general@lists.php.net
Subject: [PHP] setcookie() in 4.2.0
The following code doesn't work properly on PHP 4.1:
<?php
echo "<p>Blah, blah</p>";
setcookie("kuku", "abc");
setcookie("lala", "def");
setcookie("zuzu", "ghi");
?>
Because I wrote echo statement before setcookie. But it works on PHP
4.2. Is it due to "output_buffering=4096" directive in php.ini?
--
Best regards,
Olexandr mailto:supaboy@i.com.ua
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002