I encountered this problem when I was trying to download php file by using both of FlashFXP and FileZilla. The problem is the file which has been transfered has double-spaced for each line of code, as the picture demonstrate above. To settle it, you have to change the file transfer type in your tool. Take FileZilla as an example:
Go to ‘Edit-Settings, Transfers-File Types’, the default setting is ‘Auto’, select ‘Binary’ would solve the problem.