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

      <legend id='3D4Ux'><style id='3D4Ux'><dir id='3D4Ux'><q id='3D4Ux'></q></dir></style></legend>
    1. <tfoot id='3D4Ux'></tfoot>
    2. <small id='3D4Ux'></small><noframes id='3D4Ux'>

        <bdo id='3D4Ux'></bdo><ul id='3D4Ux'></ul>

        在 PHP 中将 Word 文档转换为可用的 HTML

        时间:2023-07-16
      1. <i id='YIZ06'><tr id='YIZ06'><dt id='YIZ06'><q id='YIZ06'><span id='YIZ06'><b id='YIZ06'><form id='YIZ06'><ins id='YIZ06'></ins><ul id='YIZ06'></ul><sub id='YIZ06'></sub></form><legend id='YIZ06'></legend><bdo id='YIZ06'><pre id='YIZ06'><center id='YIZ06'></center></pre></bdo></b><th id='YIZ06'></th></span></q></dt></tr></i><div id='YIZ06'><tfoot id='YIZ06'></tfoot><dl id='YIZ06'><fieldset id='YIZ06'></fieldset></dl></div>

      2. <tfoot id='YIZ06'></tfoot>
          <legend id='YIZ06'><style id='YIZ06'><dir id='YIZ06'><q id='YIZ06'></q></dir></style></legend>
            <tbody id='YIZ06'></tbody>

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

                  <bdo id='YIZ06'></bdo><ul id='YIZ06'></ul>
                • 本文介绍了在 PHP 中将 Word 文档转换为可用的 HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一组 Word 文档,我想使用我编写的 PHP 工具发布这些文档.我将 Word 文档复制并粘贴到文本框中,然后使用 PHP 程序将它们保存到 MySQL 中.我遇到的问题源于 Word 文档具有的所有非标准字符,例如弯引号和省略号 ("...").我目前所做的是用纯文本或 HTML 实体(&eacute; 等)手动搜索和替换这些类型的东西(以及外来符号,例如 e-acute) 是否有 PHP 中的函数我可以调用将获取 Word 文档的输出并将所有应为实体的内容转换为实体,并将其他在 Firefox 中无法正确显示的符号转换为可以显示的符号.

                  I have a set of Word documents which I want to publish using a PHP tool I've written. I copy and paste the Word documents into a text box and then save them into MySQL using the PHP program. The problem I Have arises from all the non-standard characters that Word documents have, like curly quotes and ellipses ("..."). What I do at the moment is manually search and replace these kinds of things (and also foreign symbols such as e-acute) with either plain text or HTML entities (&eacute ; etc) Is there a function in PHP I can call that will take the output of a Word document and convert everything that should be entities into entities, and other symbols that don't display properly in Firefox into symbols that do display.

                  谢谢!

                  推荐答案

                  更好的解决方案是确保您的数据库设置为支持 UTF-8 字符.扩展集中可用的附加字符应涵盖您所谈论的所有非标准"字符.

                  A better solution would be to ensure that your database is set-up to support UTF-8 characters. The additional characters available in the extended set should cover all the "non-standard" characters that you're talking about.

                  否则,如果您确实必须将这些字符转换为 HTML 实体,请使用 htmlentities().

                  Otherwise, if you really must convert these characters into HTML entities, use htmlentities().

                  这篇关于在 PHP 中将 Word 文档转换为可用的 HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:PHP - 获取 Word 文档中的页数 下一篇:使用 PHP 转换 Microsoft Word 特殊字符

                  相关文章

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

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

                      <tfoot id='WDlKW'></tfoot>