note 27239 deleted from function.fopen by vincent
| From: | vincent@php.net | Date: | Sat, 16 Aug 2003 13:27:22 +0000 |
| Subject: | note 27239 deleted from function.fopen by vincent | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-54346@lists.php.net to get a copy of this message | ||
Note Submitter: Michele.Manzato at verona.miz.it
----
Actually there is a further undocumented open mode, "wt", that allows one to have
end-of-line chars correctly written under Win32:
$fp = fopen("foo.txt", "wt");
fwrite($fp, "Hello\nthere!\n");
fclose($fp);
correctly write 2 CR-LF sequences under Win32, while:
$fp = fopen("foo.txt", "w");
fwrite($fp, "Hello\nthere!\n");
fclose($fp);
does not - the resulting file is garbled in Notepad.
Have fun
Michele