The doc file uploaded by the Web Editor is garbled and not prompted for download in the foreground

Source: Internet
Author: User
The site background editor to upload doc documents, files saved in the folder, I test the time placed in this machine, virtual space Open is normal, but placed in the customer's intranet server opened also do not prompt to download, directly open is a garbled, I right-click File target Save as the file suffix name is xxx.htm file, directly in the browser address bar copy address Open is garbled. Do not know how this problem is, my server is not configured well, or my program code has a problem, the head of the program page I also added the header ("content-type:text/html; Charset=utf-8 ") does not work, who knows what is going on?


Reply to discussion (solution)

This is typically caused by a file type that is not supported by the server, and you can consider setting up in Apache to completely solve your problem.

Server I've installed word2003, too.

The Word document is a binary file, and you also header ("content-type:text/html; Charset=utf-8 ") Declaration as text
The browser is not garbled to blame it

The Word document is a binary file, and you also header ("content-type:text/html; Charset=utf-8 ") Declaration as text
The browser is not garbled to blame it


I just don't declare it, it's garbled.

In addition to IE can open Word document (not garbled) outside, should appear download
As to how you made him appear in the browser, you didn't say I didn't know.

If you do not download through PHP, directly open the file, but garbled?

In addition to IE can open Word document (not garbled) outside, should appear download
As to how you made him appear in the browser, you didn't say I didn't know.


I am in the background editor upload attachments that piece of Word file, the source file is saved in the specified folder, the foreground open an article automatically display the Word file name, but click on the Word file when the Open is not prompted to download, is directly garbled.

What browser is used?

What browser is used?


IE browser, the minimum version is IE6

IE is unlikely to happen, even if the first time the download box you chose to open and tick the next time no longer ask
So that means you opened him in the browser.
If it is garbled, it must be your Word file is corrupted, or what you did in the process

IE is unlikely to happen, even if the first time the download box you chose to open and tick the next time no longer ask
So that means you opened him in the browser.
If it is garbled, it must be your Word file is corrupted, or what you did in the process


Word documents I in the server folder can be opened to see, as for the process I really did not do anything, just put the file through the editor attachment upload, and then submit the finished, in the foreground open the article opened when it was so.

There may be a problem with this server, you replace the windows2008 server to try it

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.