本文介绍了ZipArchive :: close():无法创建临时文件:权限被拒绝的nginx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很乐意为您解决以下问题的好建议.对于平台,我必须创建php word文档,并且碰巧在Apache开发环境中,该代码可以完美执行.但是在nginx平台上,我仍然收到该主题提示的错误:

I would love a good suggestion how to fix the following.For a platform I have to create php word documents and it so happens that on the Apache dev environment this code executes perfectly; yet on the nginx platform I keep on receiving the error as the topic suggests:

ZipArchive::close(): Failure to create temporary file: Permission denied

构建非常简单:

$phpWord = new \PhpOffice\PhpWord\PhpWord();

//code block as in the documentation

$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord,'Word2007');

$objWriter->save('doorverwijzing_patient_xxxxxxxxxx.docx');

在哪里可以更改nginx文件夹structrue中的这些权限以创建这些文档?

Where do I change these permissions in the nginx folder structrue to be able to create these documents?

推荐答案

我遇到了同样的问题,大概花了3个小时试图解决,才发现问题不在代码中,问题出在我试图保存的文件.确保文件名没有特殊字符

Had the same issue happen to me, for like 3 hours trying to resolve only to find out that problems was not in the code, problem was in the name of the file I was trying to save. Make sure the file name has no special characters

这篇关于ZipArchive :: close():无法创建临时文件:权限被拒绝的nginx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 07:48