Save txt file with windows encoding

0

My application runs on a Unix OS, so my .TXT files are created in UNIX format, I need these files to be created in WINDOWS format.

I need line breaks to be in WINDOWS format \ r \ n. I'm having trouble with UNIX format because it only inserts the \ n.

Today, I create the files using file_put_contents .

    
asked by anonymous 30.08.2016 / 22:17

1 answer

0

You can write the file by adding line breaks manually with the #13 + #10 characters using the chr() function.

    
01.09.2016 / 13:43