Skip to main content

Debugging2

Bug hunting, search and destroy, the end to the ghost in the machine.

Attaching .docx files via PHP DebuggingTutorialsWeb Development

Attaching .docx files via PHP

Interesting bug today: A client's web form takes file uploads and forwards them as email attachments. Script works great for .doc files, but .docx files end up as mysterious attachments with filenames like ATT00010.txt, whose content starts with this: application/vnd.openxmlformats-officedocument.wordprocessingml.document; name="filename.docx" Content-Disposition: attachment; filename="filename.docx" Content-Transfer-Encoding: base64 This "header" is followed…
Taavo
June 21, 2011