squiblo Posted April 24, 2010 Share Posted April 24, 2010 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); Quote Link to comment https://forums.phpfreaks.com/topic/199601-n-new-line-in-fwrite-not-working/ Share on other sites More sharing options...
mrMarcus Posted April 24, 2010 Share Posted April 24, 2010 try "\r\n" Quote Link to comment https://forums.phpfreaks.com/topic/199601-n-new-line-in-fwrite-not-working/#findComment-1047681 Share on other sites More sharing options...
squiblo Posted April 24, 2010 Author Share Posted April 24, 2010 thats done the trick, thanks Quote Link to comment https://forums.phpfreaks.com/topic/199601-n-new-line-in-fwrite-not-working/#findComment-1047684 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.