Page 1 of 1

Line Break Problem in .txt file

Posted: Sat Aug 08, 2009 5:45 am
by habib009pk
Dear Friends

I am facing a little problem, i am creating a file in which data came from a form through different textareas. now data can be writen in a file and the this file can be downloaded in our local machine.

Now the problem is that when i cancatenate all posted values. with '\n' or '\r' then no line break included in my txt file..

it is working on my local system with that variable

$space="


";

but when i upload it on the live server than it will never work

Please help me regarding that when i write data in a txt file through fopen then line breaks also included in my text file on live server

Thanks And Regards

Re: Line Break Problem in .txt file

Posted: Sat Aug 08, 2009 8:37 am
by frao_0
could be lots of things. First, is your server hosted on *nix or Windows? They treat line breaks differently. I did not fully understand your questions. So you are passing a textarea value to a POST form that will then save the passed value into a file through fopen, right? Do you want the line breaks symbols \r and \n to appear? Are they appearing all along the process? If not, at which step do they disappear? Maybe show us some code.