dqqg0811 2018-09-12 07:13
浏览 143

PHP ZipArchive:替换.docx中的格式化文本?

I'm trying to replace some strings with other strings in my docx file, like it's described in this answer.

Everything works fine with non-formatted text, but bold text I want to replace gets ignored. Is it somehow possible using just native ZipArchive, or should I abandon the hope and install something additional?

Linux command line would be fine too, but sed has same problems.

  • 写回答

1条回答 默认 最新

  • duandu1049 2018-09-12 07:47
    关注

    Looks like it was more a search pattern question. Strings I wanted to replace had some wicked formatting like %username% and {{date}}, replacing them with simple NAME and DATE made everything work just fine

    评论

报告相同问题?

悬赏问题

  • ¥15 一道python难题2
  • ¥15 一道python难题
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备