Jump to content

Read and write to text file


fapofa

Recommended Posts

Hello all -

I am new to this  ;D, I am trying to do a simple thing: read a line from a text file and write this line to another text file. The problem is: when I write the text into the new file there is an empty space between each characters. EG my original line is abcdef and the result is: a b c d e f  . I tried and tried, searched google, but I am stuck... How can I read line n from one file and write it to another file exactly the same? thx in advance.

Link to comment
https://forums.phpfreaks.com/topic/48095-read-and-write-to-text-file/
Share on other sites

I solved the problem ... my original text file was in a binary form on the server, why? it beats me, I uploaded it in Ascii. I have been using ftp for years.  Now even if I rename the file or change the content in it it will only upload in binary ... even if I specify ascii to wsftp pro. I opened a new file, copied the content to the new file and overwrote the old file and it works now. hmmm strange... Hey thanks for the very quick reply AndyB, nice to know there are people willing to help a newbie .... Thx

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.