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
Line Break Problem in .txt file
Moderator: General Moderators
-
habib009pk
- Forum Commoner
- Posts: 43
- Joined: Sun Jul 05, 2009 11:28 pm
Re: Line Break Problem in .txt file
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.