我正在尝试使用 html2pdf PHP 类保存 pdf 文件。 代码是这样的:
$this->html2pdf->Output('directory/file_name.'.pdf', 'F');
但我总是遇到这个错误 TCPDF ERROR: Unable to create output file
文件夹'folder'(名称是一个例子,很明显)存在并具有正确的权限!
我试图省略文件夹名称,但无论如何都会出现此错误...
谁能帮帮我?
最佳答案
那是因为您的文件夹没有适当的权限。请更改您的目录权限。 在 Linux 中,您将像下面提到的那样执行此操作。
chmod -R 0777 /yourdirectory
关于PHP TCPDF 错误 : Unable to create output file the folder exist and has the right permissions,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20742727/