note 67927 deleted from function.setcookie by bjori

From: Date: Mon, 08 Jan 2007 10:51:40 +0000
Subject: note 67927 deleted from function.setcookie by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-121435@lists.php.net to get a copy of this message
Note Submitter: Olivier Jacquet ---- 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);

« previous php.notes (#121435) next »