Your browser's View Source function is using a different line-break format than your editor, so the breaks aren't recognized. For an exact explanation we would need to know what OS you're on, what editor, what form of line ending it uses, what ftp program you use to upload and what its settings are ... and possibly a few other things.
Or did you mean that when you upload a file and later download the same file, the carriage returns are gone with the wind?
Raise your hand if you saw the topic title and thought the answer would involve relative links and CSS :)
If you View Source while the file is online, are the line breaks still there? That narrows it down.
Start by checking the settings in your ftp program. A quick look at Fetch, for comparison, tells me that there's a Preference setting under Downloads for line-ending format. In Windows, you need to use CRLF or \r\n. It will probably just say "Windows or DOS format" as opposed to "Unix format". There are even some special line-break markers within unicode, but I doubt those are your problem.
Huh. I thought Forums threads auto-locked after a month or two. Did someone change something?
Do you mean that the file doesn't look right when viewed in the browser, or only that View Source has become illegible? A lot of people don't even care what the source code looks like*, because visible line breaks in html don't have anything to do with line breaks in the source. That is,
looks the same** to your user as <p> <br> <br> <br> </p>
Its only when I download the file again to edit with notepad++. Im not looking at it with the browser. I suspect it has something to do with file permissions but not sure why some php files would get different permissions that others? Could it be using a networked PC if you create the file from a different machine or directly on that machine. I could see how the PC would see that as different users and possibly assign different permissions to the file? But this gets messed up when uploading it?
This seems to be default behavior of WinSCP. I do not know why it has just started doing this, but the solution is simply to change your transfer mode to 'Binary' if you want the file to be uploaded exactly as-is. See the discussion on WinSCP forums here: [winscp.net...]