note 73277 added to function.session-start

From: Date: Thu, 15 Feb 2007 16:08:34 +0000
Subject: note 73277 added to function.session-start
Groups: php.notes 
Request: Send a blank email to php-notes+get-123462@lists.php.net to get a copy of this message
For those encoding their pages in UTF-8 but running into problems with BOM data (Byte Order Marks) being outputted before anything else - such as $_SESSION data - but wish to use UTF-8 encoding, and who do NOT wish to use UTF-8 No BOM encoding because the latter produces weird results when using foreign language accented characters, try the following : - Save your document with UTF-8 No BOM encoding (on a mac, using BBEdit, this is normally found on the very bottom left corner of the window). This will produce a document that will not output BOM data. - then, in your scripts, include the following: header('Content-Type: text/html; charset=UTF-8'); before your call to session_start() hope that helps someone. ---- Server IP: 194.246.101.61 Probable Submitter: 88.161.174.11 ---- Manual Page -- http://www.php.net/manual/en/function.session-start.php Edit -- https://master.php.net/note/edit/73277 Del: integrated -- https://master.php.net/note/delete/73277/integrated Del: useless -- https://master.php.net/note/delete/73277/useless Del: bad code -- https://master.php.net/note/delete/73277/bad+code Del: spam -- https://master.php.net/note/delete/73277/spam Del: non-english -- https://master.php.net/note/delete/73277/non-english Del: in docs -- https://master.php.net/note/delete/73277/in+docs Del: other reasons-- https://master.php.net/note/delete/73277 Reject -- https://master.php.net/note/reject/73277 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#123462) next »