【发布时间】:2021-10-28 13:26:35
【问题描述】:
我正在创建一个自定义 php 项目,该项目使用 https://github.com/PHPOffice/PHPWord 导出 docx 文件。在我的本地主机上成功测试后,我将它部署在服务器中,但不幸的是,我收到此错误:
The file PhpOffice\PhpWord\TemplateProcessor.php is missing in the includes folder.
这就是我调用文件的方式
$file_name = dirname(__FILE__).'/template/template.docx';
$templateProcessor = new \PhpOffice\PhpWord\TemplateProcessor($file_name);
我已经尝试了stackoverflow的几种方法,但仍然无法修复它。
有人可以帮我解决这个问题吗?
【问题讨论】: