|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-12-13 14:43 UTC] joey at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 23 21:00:01 2025 UTC |
I don't think this is the way it is supposed to be. If there is white space before a setcookie() call, even if no text is sent, setcookie fails because it was thinking that text has been sent. More exactly, if we have this (the dashes indicate begining of file) ---------------------------------------- <?php include("include.inc"); ?> <?php setcookie("test", "test", time()+60); ?> ----------------------------------------- will FAIL, even though inside my include.inc I have no text being printed out. The following DOES work. -------------------------------------- <?php include("include.inc"); ?> <?php setcookie("test", "test", time()+60); ?> ------------------------------------- Notice how there is no space after the include. The whitespace outside of the <?php ?> tags seems to matter. This is not clearly defined in the documentation, and I believe it's a bug.