admin管理员组文章数量:1308601
Using PHPWord, I've managed with this line:
$section->addText('<');
to provoke an Error in Microsoft Word opening the .docx file:
+---------------------------------------------------------------+
| Microsoft Office Word ? X |
+---------------------------------------------------------------+
| The file BrynergyTest.docx cannot be opened because there are |
| problems with the contents. |
| [ OK ] [ Details >>> ] |
+---------------------------------------------------------------+
Other symbols, such as:
$section->addText('t');
work fine.
I expected the result to have the Word XML file with the contents of the less-than-sign "<" (U+003C LESS-THAN SIGN).
Using PHPWord, I've managed with this line:
$section->addText('<');
to provoke an Error in Microsoft Word opening the .docx file:
+---------------------------------------------------------------+
| Microsoft Office Word ? X |
+---------------------------------------------------------------+
| The file BrynergyTest.docx cannot be opened because there are |
| problems with the contents. |
| [ OK ] [ Details >>> ] |
+---------------------------------------------------------------+
Other symbols, such as:
$section->addText('t');
work fine.
I expected the result to have the Word XML file with the contents of the less-than-sign "<" (U+003C LESS-THAN SIGN).
Share Improve this question edited Feb 3 at 23:27 hakre 198k55 gold badges447 silver badges855 bronze badges Recognized by PHP Collective asked Feb 3 at 12:54 CymroCymro 1,4402 gold badges12 silver badges35 bronze badges1 Answer
Reset to default 2I found this answer:
\PhpOffice\PhpWord\Settings::setOutputEscapingEnabled(true);
本文标签: phpPHPWord bracket causes rendered Word document to be unopenableStack Overflow
版权声明:本文标题:php - PHPWord bracket causes rendered Word document to be un-openable - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741820029a2399308.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论