Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 phpword 从模板创建 docx 文件,但是当我保存最终文档并尝试打开结果时,我收到一条错误消息,提示我没有打开文件的访问权限。如何使用 phpword 控制访问权限,以便每个人都可以打开文件。谢谢你。
嗨,我刚刚提出了一个类似的问题并自己解决了。所以也在这里张贴,以防你仍然需要知道。我进入 Template.php 并更改了 saveAs() 函数。我换了行:
rename($tempFilename, $strFilename);
至:
copy($tempFilename, $strFilename); unlink($tempFileName);
希望对某人有所帮助。