I would like some help with the line feed and carriage return characters. What I'm trying to do is output some text files to create an application error log. I didn't even start trying to append lines to the log when I realized I couldn't manage to write new lines.. This is the generic test code I wrote:
Code: Select all
$content = $db_day.$db_month.substr($db_year, 2, 2).'\n';
$content .= $dbf_day.$dbf_month.substr($dbf_year, 2, 2).'\n';
$content .= $priorita .'\n';
$content .= $record['titolo'].'\n';
$content .= $record['testo'].'\n';
$handle = fopen($filename, 'w'));
fwrite($handle, $content);
fclose($handle);It's very unclear to me at which level the system should translate those into what I mean to be a carriage return or a new line, if not both.
I develop over a Gentoo box with php4 and apache 2.
Thanks in advance for your inputs guys,
stay cool!
Burn