otuatail Posted October 11, 2006 Share Posted October 11, 2006 Can anyone help on Unix/LynuxThe server I am using for the website is Unix/Lynux. I have a text based file like notepadI am trying to apend lines to it but I do not get a new line each time instead i get a symbol of a square and it carries on. The code is$fh = fopen("hitlog.txt","a");fwrite($fh,$val . "\r\n");fclose($fh);The \r\n don't seem to have an efect. Any IdeasDesmond. Quote Link to comment Share on other sites More sharing options...
printf Posted October 11, 2006 Share Posted October 11, 2006 HiWindows = \r\nUnix/Linux = \nMac/OSX = \rSo you would use "\n" where you now have "\r\n"me! Quote Link to comment 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.