Reputation: 8151
I have a php script that creates a text file:
<?php
$f = fopen("x.mrg","wt");
fwrite($f,"testing\n123\n");
fclose($f);
?>
When I look at the output file in a hex editor, the \n
has been changed to \r\n
(0D 0A)
Complete hex output:
74 65 73 74 69 6E 67 0D 0A 31 32 33 0D 0A testing..123..
How do I stop it doing that? Is there an ini file setting for this?
I'm using php 5.6.7 on windows 8.1
I'm using HxD to view the hex
Upvotes: 1
Views: 60