note 116406 added to function.trim

From: Date: Sun, 28 Dec 2014 00:14:12 +0000
Subject: note 116406 added to function.trim
Groups: php.notes 
Request: Send a blank email to php-notes+get-201269@lists.php.net to get a copy of this message
If you want to get rid of those "UTF-8 starting bytes" which are saved at the beginning of the file saved in UTF-8 (if saved with ByteOrderMask), use this: <?php trim( file_get_contents($filePath), "\xEF\xBB\xBF"); ?> or add them to default characters : <?php trim( file_get_contents($filePath), " \t\n\r\0\x0B\xEF\xBB\xBF"); ?> ---- Server IP: 72.52.91.14 Probable Submitter: 195.91.13.46 ---- Manual Page -- http://php.net/manual/en/function.trim.php Edit -- https://master.php.net/note/edit/116406 Del: integrated -- https://master.php.net/note/delete/116406/integrated Del: useless -- https://master.php.net/note/delete/116406/useless Del: bad code -- https://master.php.net/note/delete/116406/bad+code Del: spam -- https://master.php.net/note/delete/116406/spam Del: non-english -- https://master.php.net/note/delete/116406/non-english Del: in docs -- https://master.php.net/note/delete/116406/in+docs Del: other reasons-- https://master.php.net/note/delete/116406 Reject -- https://master.php.net/note/reject/116406 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#201269) next »