Re: Writing byte 0A to a file (LF / CR related)
| From: | Thomas Seifert | Date: | Wed, 25 Dec 2002 10:58:54 +0000 |
| Subject: | Re: Writing byte 0A to a file (LF / CR related) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-129320@lists.php.net to get a copy of this message | ||
from the manual:
Note: On systems which differentiate between binary and text files (i.e. Windows) the file must be
opened with 'b' included in fopen() mode parameter.
Thomas
On Wed, 25 Dec 2002 11:43:13 +0100 bigbunny@planetstarsiege.com (Bbun) wrote:
> Hey,
>
> I am trying to write some binary data (image) to a file, but using fputs,
> every 0A byte will be written as 0D 0A. This is because of the windows
> representation of a new line (\r\n), but I'm not writing a text file! I'm
> writing binary data! Does anyone know how I can make this work correctly?
>
> Thanks
>
>