Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Resource interpreted as Document but transferred with MIME type application/vnd.openxmlformats-officedocument.wordprocessingml.document
- $file = "uploads/demo.docx";
- //text/html; charset=UTF-8 - С этим заголовком предупреждений нету
- header ("Content-Type: application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document; charset=UTF-8");
- header ("Accept-Ranges: bytes");
- header ("Content-Length: ".filesize($file));
- header ("Content-Disposition: attachment; filename=demo.docx");
- readfile($file);
- <a href="http://server/uploads/demo.docx">Скачать</a>
Add Comment
Please, Sign In to add comment