note 99971 modified in function.file-put-contents by danbrown
| From: | danbrown@php.net | Date: | Fri, 17 Sep 2010 14:34:04 +0000 |
| Subject: | note 99971 modified in function.file-put-contents by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-172683@lists.php.net to get a copy of this message | ||
NOTE : file_put_contents doesn't add a valid BOM while creating the file
<?php
$myFile = 'test.txt';
$myContent = 'I love PHP';
file_put_contents($myFile, "\xEF\xBB\xBF".$myContent);
?>
--was--
NOTE : file_put_contents doesn't add a valid BOM while creating the file
<?php
$myFile = 'test.txt';
$myContent = 'I love PHP';
file_put_contents($myFile, "\xEF\xBB\xBF".$myContent);
http://php.net/manual/en/function.file-put-contents.php