Corruption of Files

I have an interesting problem. On one particular set of files only I am finding that the the files tend to become one long line of code. Sometimes this does not affect the rendered page, but sometimes its upsets the PHP and sometimes bits of code go missing as well. What looks OK in my HotDog text editor comes back compressed after being FTP’d to the remote site and FTP’d back. I have ‘good’ files and ‘bad’ ones; only the bad ones do this. I can overcome the problem by copying a bad file on top of a good one. But the problem creeps back in, just like a virus spreading among the files.

I have put examples of both types up at www.pfwd.co.uk/sitepoint. Both started off the same. You need to View Source to see anything. The good one is happy to be FTP’d to and fro, the bad one gets compressed.

I should love to get to the bottom of this.

Are you sometimes sending in ASCII mode and sometimes in BINARY?

Thank you for the reply. I think you might have asked the right question there. I use WS_FTP and have it set to Auto, which means that all files go as binary except those on its ASCII list. As WS_FTP came, it did not have php files on its ASCII list, so I added them. But I recently reinstalled it and guess what? Now I have added php files back in the problem seems to have gone away on a single test. But we shall see. If that turns out to be the answer, I am very grateful to you.