<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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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 的问题)

                        <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'>