Jump to content

\n (new line) in fwrite not working


squiblo

Recommended Posts

when I append more text to the content of the file it does not go onto a new line in the file, the directory to the file does work as text is appending, but not properly.

 

$message1 = $_POST['message'];
$message1 = "<li>". $message1 . "</li>";

$file1 = fopen($lang_folder.$chat_file, 'a') or die("can't open file");
fwrite($file1, "<b>" .$username. " (" .date('G:ia'). ") says:</b><br>" .$message1. "\n");
fclose($file1);

 

 

Link to comment
https://forums.phpfreaks.com/topic/199601-n-new-line-in-fwrite-not-working/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.