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. Link to comment https://forums.phpfreaks.com/topic/23643-unix-formatting/ 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! Link to comment https://forums.phpfreaks.com/topic/23643-unix-formatting/#findComment-107327 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.