your attachments.php file has something on the very first line that shouldn't be there.
you probably have opened/edited it with something other than a plain text editor that put a bit of code in the file.
1. Get a real ftp program like Filezilla
. It is free and many of us use it.
2. Get a real file editor like Notepad++
They are both free and many of us use one or the other.
3. When you need to edit a file, download it using the ftp program, open it using your text editor.
Make your edits, save the file and upload it back to the server using the ftp program.
once you have the good text editor, open any files that you have been working on in it and then save them again and reupload them.
purge your cache