<legend id='DeOtF'><style id='DeOtF'><dir id='DeOtF'><q id='DeOtF'></q></dir></style></legend>
  • <small id='DeOtF'></small><noframes id='DeOtF'>

      <tfoot id='DeOtF'></tfoot>
      <i id='DeOtF'><tr id='DeOtF'><dt id='DeOtF'><q id='DeOtF'><span id='DeOtF'><b id='DeOtF'><form id='DeOtF'><ins id='DeOtF'></ins><ul id='DeOtF'></ul><sub id='DeOtF'></sub></form><legend id='DeOtF'></legend><bdo id='DeOtF'><pre id='DeOtF'><center id='DeOtF'></center></pre></bdo></b><th id='DeOtF'></th></span></q></dt></tr></i><div id='DeOtF'><tfoot id='DeOtF'></tfoot><dl id='DeOtF'><fieldset id='DeOtF'></fieldset></dl></div>

          <bdo id='DeOtF'></bdo><ul id='DeOtF'></ul>
      1. 如何使用 PHP 或 HTML 在浏览器中查看/打开 Word 文档

        How can I view/open a word document in my browser using with PHP or HTML(如何使用 PHP 或 HTML 在浏览器中查看/打开 Word 文档)

      2. <tfoot id='ggM4j'></tfoot>

          <bdo id='ggM4j'></bdo><ul id='ggM4j'></ul>

            <tbody id='ggM4j'></tbody>

          <small id='ggM4j'></small><noframes id='ggM4j'>

          1. <i id='ggM4j'><tr id='ggM4j'><dt id='ggM4j'><q id='ggM4j'><span id='ggM4j'><b id='ggM4j'><form id='ggM4j'><ins id='ggM4j'></ins><ul id='ggM4j'></ul><sub id='ggM4j'></sub></form><legend id='ggM4j'></legend><bdo id='ggM4j'><pre id='ggM4j'><center id='ggM4j'></center></pre></bdo></b><th id='ggM4j'></th></span></q></dt></tr></i><div id='ggM4j'><tfoot id='ggM4j'></tfoot><dl id='ggM4j'><fieldset id='ggM4j'></fieldset></dl></div>

                • <legend id='ggM4j'><style id='ggM4j'><dir id='ggM4j'><q id='ggM4j'></q></dir></style></legend>
                  本文介绍了如何使用 PHP 或 HTML 在浏览器中查看/打开 Word 文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如何在浏览器中打开和查看 .doc 文件扩展名?该文件位于我的服务器上.

                  How can I open and view a .doc file extension in my browser? The file is located on my server.

                  推荐答案

                  两个选项:第一个是链接到它,例如<a href="MyWordDocument.doc">My Word Document</a>,二是使用iframe,指向文档.然而,为了使其工作,大多数浏览器要求服务器随文档发送一个 Content-disposition: inline 标头.如果您无法配置您的网络服务器来执行此操作,您可以将文档包装在一些 php 中:

                  Two options: First is to just link to it, e.g. <a href="MyWordDocument.doc">My Word Document</a>, the second is to use an iframe and point it to the document. For this to work, however, most browsers require that the server sends a Content-disposition: inline header with the document. If you cannot configure your web server to do this, you can wrap the document in a bit of php:

                  <?php
                  header('Content-disposition: inline');
                  header('Content-type: application/msword'); // not sure if this is the correct MIME type
                  readfile('MyWordDocument.doc');
                  exit;
                  

                  然后链接到该脚本而不是您的 Word 文档.

                  And then link to that script instead of your word document.

                  但这并不能保证有效;content-disposition 标头只是一个提示,任何浏览器都可以选择将其视为附件.

                  This isn't guaranteed to work though; the content-disposition header is just a hint, and any browser may choose to treat it as an attachment anyway.

                  另外,请注意 .doc 并不是完全可移植的;基本上,您需要 Word 才能正确显示它(Open Office 和其他一些开源应用程序做得不错,但还没有完全实现),并且浏览器必须支持将 Word 作为插件打开.

                  Also, note that .doc isn't exactly portable; basically, you need Word to display it properly (Open Office and a few other Open Source applications do kind of a decent job, but they're not quite there yet), and the browser must support opening Word as a plugin.

                  如果 .doc 文件格式要求不是一成不变的,那么 PDF 将是更好的选择(转换通常就像在 PDF 打印机上打印一样简单,比如从 Word 内部的CutePDF),或者也许你甚至可以将文档转换为 HTML(尽管里程可能会有所不同).

                  If the .doc file format requirement isn't set in stone, PDF would be a better choice (the conversion is usually as simple as printing it on a PDF printer, say, CutePDF, from inside Word), or maybe you can even convert the document to HTML (mileage may vary though).

                  这篇关于如何使用 PHP 或 HTML 在浏览器中查看/打开 Word 文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                    <legend id='J6pC4'><style id='J6pC4'><dir id='J6pC4'><q id='J6pC4'></q></dir></style></legend>
                  • <tfoot id='J6pC4'></tfoot>
                      <tbody id='J6pC4'></tbody>
                    • <bdo id='J6pC4'></bdo><ul id='J6pC4'></ul>

                      <small id='J6pC4'></small><noframes id='J6pC4'>

                        • <i id='J6pC4'><tr id='J6pC4'><dt id='J6pC4'><q id='J6pC4'><span id='J6pC4'><b id='J6pC4'><form id='J6pC4'><ins id='J6pC4'></ins><ul id='J6pC4'></ul><sub id='J6pC4'></sub></form><legend id='J6pC4'></legend><bdo id='J6pC4'><pre id='J6pC4'><center id='J6pC4'></center></pre></bdo></b><th id='J6pC4'></th></span></q></dt></tr></i><div id='J6pC4'><tfoot id='J6pC4'></tfoot><dl id='J6pC4'><fieldset id='J6pC4'></fieldset></dl></div>