Forum Moderators: coopster

Message Too Old, No Replies

php writing in Mac format

         

eltreno

10:48 am on Dec 14, 2004 (gmt 0)

10+ Year Member



Hi I had a small javascript/php app in which I am using to make xml files.

It works fine but i am using \n to produce line breaks as the javascript writes in to my textarea box (for readable purposes).

Then the form submits and php creates a xml file on my linux server.

The Problem is the file are written in Mac format, ie line breaks don't show etc so I need them to be saved as dos format, is there a way to do this without opening them in a text editor and converting them manually.

Trent

timster

3:15 pm on Dec 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think you should be able to use \015\012 instead of \n to produce the proper CRLF line break, regardless of platform.