note 67927 added to function.setcookie

From: Date: Thu, 06 Jul 2006 15:09:28 +0000
Subject: note 67927 added to function.setcookie
Groups: php.notes 
Request: Send a blank email to php-notes+get-114514@lists.php.net to get a copy of this message
To respond to the UTF-8 encoding post: "Although I wish it were different, UTF-8 encoded scripts start output at the php tag declaration." This is because many editors put a BOM (Byte Order Marker) at the beginning of a UTF-8 file. These 2 bytes also get send to the browser. To solve this you can either remove the bytes from the file with a binary editor or turn on output_buffering. In relation to setting cookies: If you want to set cookies that need to be remembered forever you can use the PHP_INT_MAX constant. setcookie("cookieName", $cookieValue, PHP_INT_MAX); ---- Server IP: 66.163.161.117 Probable Submitter: 194.78.195.194 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.setcookie.php Edit -- http://master.php.net/note/edit/67927 Del: integrated -- http://master.php.net/note/delete/67927/integrated Del: useless -- http://master.php.net/note/delete/67927/useless Del: bad code -- http://master.php.net/note/delete/67927/bad+code Del: spam -- http://master.php.net/note/delete/67927/spam Del: non-english -- http://master.php.net/note/delete/67927/non-english Del: in docs -- http://master.php.net/note/delete/67927/in+docs Del: other reasons-- http://master.php.net/note/delete/67927 Reject -- http://master.php.net/note/reject/67927 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#114514) next »