[PHP] Writing byte 0A to a file (LF / CR related)

2002-12-25 Thread BBun
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?

[PHP] Writing byte 0A to a file (LF / CR related)

2002-12-25 Thread BBun
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?