Does anyone know why some of my websites add a blank line after every line of code, while others on the same host and server leave the files untouched?
A few details that might help:
- PHP Version 5.3.5
- Linux Servers
- MySQL- Client API version 5.1.56
- SERVER[“HTTP_ACCEPT_CHARSET”] (ISO-8859-1,utf-8;q=0.7,*;q=0.7)
NOTE:
I can provide additional config info, I wasn’t sure which details if any would be helpful.
I can download the file via FTP and the additional lines are present, but if I copy and paste from the WP Theme Edit page the additional lines aren’t there.
This is more of an annoyance than a problem. I don’t believe any problems are caused by the odd behavior, but I am curious to know if anyone else has noticed this and if anyone knows the cause. I’m not sure if this is a WordPress or simply a server config issue. Any input is appreciated.
Regards,
JJ
I think the difference is probably something to do with the editor you use to edit files, and specifically the line ending characters.
DOS machines (like Windows) use a carriage return character and a line feed (“rn”) as a line ending, and Unix-based machines (newer Macs and Linux included) use just a single line feed character (“n”). When files are transferred back and forth between the two different systems and through different text editors, those line breaks get converted in different ways.
I wouldn’t worry about it, unless it really seriously bugs you. Most text editors can be configured to recognize different EOL characters and account for them or convert them to your desired format. And if not, there’s always find/replace.