<tfoot id='hFKkx'></tfoot>
      • <bdo id='hFKkx'></bdo><ul id='hFKkx'></ul>

      <legend id='hFKkx'><style id='hFKkx'><dir id='hFKkx'><q id='hFKkx'></q></dir></style></legend>

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

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

        如何在 HTML/PHP 中显示格式化的 Word Doc?

        How do you display a formatted Word Doc in HTML/PHP?(如何在 HTML/PHP 中显示格式化的 Word Doc?)
          1. <tfoot id='dmFNO'></tfoot>

              <tbody id='dmFNO'></tbody>
            <legend id='dmFNO'><style id='dmFNO'><dir id='dmFNO'><q id='dmFNO'></q></dir></style></legend>

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

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

                  本文介绍了如何在 HTML/PHP 中显示格式化的 Word Doc?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在 HTML/PHP 中显示格式化 Word 文档的最佳方式是什么?

                  What is the best way to display a formatted Word Doc in HTML/PHP?

                  这是我目前拥有的代码,但没有对其进行格式化:

                  Here is the code I currently have but it doesn't format it:

                  $word = new COM("word.application") or die ("Could not initialise MS Word object.");
                  $word->Documents->Open(realpath("ACME.doc"));
                  
                  // Extract content.
                  $content = (string) $word->ActiveDocument->Content;
                  
                  echo $content;
                  
                  $word->ActiveDocument->Close(false);
                  
                  $word->Quit();
                  $word = null;
                  unset($word);
                  

                  推荐答案

                  我对 COM 一无所知,但是在 MSDN 上翻阅 Word API 文档,看起来您最好的选择是使用 Document.SaveAs另存为 wsFormatFilteredHTML 到一个临时文件,然后将该 HTML 提供给用户.请务必选择过滤 HTML,否则您将获得有史以来最浓的标签.

                  I know nothing about COM, but poking around the Word API docs on MSDN, it looks like your best bet is going to be using Document.SaveAs to save as wsFormatFilteredHTML to a temporary file, then serving that HTML to the user. Be sure to pick the filtered HTML, otherwise you're going to get the soupiest tag soup ever.

                  这篇关于如何在 HTML/PHP 中显示格式化的 Word Doc?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Proxy Authentication Required with cURL(cURL 需要代理身份验证)
                  How to use a SOCKS 5 proxy with cURL?(如何使用带有 cURL 的 SOCKS 5 代理?)
                  How to use HTTP_X_FORWARDED_FOR properly?(如何正确使用 HTTP_X_FORWARDED_FOR?)
                  file_get_contents behind a proxy?(代理后面的 file_get_contents ?)
                  pecl install cassandra throws: quot;error: Unable to load libcassandraquot;(pecl install cassandra 抛出:“错误:无法加载 libcassandra)
                  Installing php datastax driver on ubuntu(在 ubuntu 上安装 php datastax 驱动)

                        <tbody id='UrM0T'></tbody>

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

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