note 55054 deleted from function.fwrite by sobak

From: Date: Thu, 01 Dec 2016 17:59:56 +0000
Subject: note 55054 deleted from function.fwrite by sobak
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-207914@lists.php.net to get a copy of this message
Note Submitter: bahatest at ifrance doc com ---- [Editor's Note: No, you only need to use this if you want a BOM (Byte order mark) added to the document - most people do not.] if you have to write a file in UTF-8 format, you have to add an header to the file like this : <?php $f=fopen("test.txt", "wb"); $text=utf8_encode("éaè!"); // adding header $text="\xEF\xBB\xBF".$text; fputs($f, $text); fclose($f); ?>

« previous php.notes (#207914) next »