Php header download word file




















Similar issue here stackoverflow. Add a comment. Active Oldest Votes. Improve this answer. HoldOffHunger Pascal Pascal. See w3. Greg Greg k 52 52 gold badges silver badges bronze badges. But Content-disposition is more correct.

USE force-download. They might work, but are useless here. RFC w3. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Ask a Question. Please Sign up or sign in to vote. See more: PHP. Copy Code. Posted Sep am Rawan S. Add a Solution. Top Rated Most Recent. Accept Solution Reject Solution. First - does your code produce a working XML based docx file that you can open with word?

If that doesn't work, then don't worry about your header information. Once you've successfully created a docx file, then you can use the header info. The following snippet works for me at least as of last week :.

Add your solution here. OK Paste as. Treat my content as plain text, not as HTML. CBroe - Thanks for answer.. Can you Please share a code example based on my script above as I tried but did not work for me I have already check all the relevant posts including the one you mentioned.. Add a comment. Active Oldest Votes. Working Solution I understand now that while being inside the function, PHP headers are initiated by the function and stopped when the function ends.

Here is the full working Code : Plugin folder: pxw-test Plugin folder content: pxw-test. Improve this answer. Community Bot 1 1 1 silver badge.

Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Stack Gives Back



0コメント

  • 1000 / 1000