Hi : I hope someone can help me with this - I'm sure there's a function somewhere that'll do what I need:
I'm using fopen() to write a file to a directory the server can see:
$fp = fopen("/home/benk/x/zzz/file.txt", "w+");
$NAME = "$PROG_NAME_TO_DISPLAY\n";
fwrite( $fp, $NAME);
This outputs the file just fine, with all the information as I want it, BUT
the file has a M character at the end of each line. I don't know if this is caused by something outside php, html and mysql, and whether it's related
to the server setup, but any solution would be great.
I've seen this problem 100's of times when transferring files from PC to UNIX,
and I then use the Solaris utility "dos2unix" to strip out the M characters - easy - but is there an equivalent I can use to prevent it happening when I use this fopen() function to output my file?
Thanks,
B