fapofa Posted April 22, 2007 Share Posted April 22, 2007 Hello all - I am new to this , 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 More sharing options...
AndyB Posted April 22, 2007 Share Posted April 22, 2007 Not so hard. Show us your code. Link to comment https://forums.phpfreaks.com/topic/48095-read-and-write-to-text-file/#findComment-235052 Share on other sites More sharing options...
fapofa Posted April 22, 2007 Author Share Posted April 22, 2007 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 Link to comment https://forums.phpfreaks.com/topic/48095-read-and-write-to-text-file/#findComment-235073 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.