note 61384 deleted from function.setcookie by theseer
| From: | theseer@php.net | Date: | Fri, 07 Jul 2006 13:03:48 +0000 |
| Subject: | note 61384 deleted from function.setcookie by theseer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-114540@lists.php.net to get a copy of this message | ||
Note Submitter: David Thomas
----
I spent some time solving this one.
If you save your php script as UTF-8 output will start at line 1 (script tag start) and setcookie()
will fail.
If you save the page as ANSI setcookie() will work properly.
I've encountered this problem before.
If anyone gets a "Headers already sent" error, check the encoding of your script page.
Although I wish it were different, UTF-8 encoded scripts start output at the php tag declaration.