本文介绍了临时文件目录"/var/www/html/activate/../temp/"在实时服务器上不可写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在生成PDF文件时,我在实时服务器上收到此错误.在我的本地系统上运行正常.我正在使用Laravel和此mPdf包来生成PDF:

I'm getting this error on live server while generating PDF file. It's working fine on my local system. I'm using Laravel and this mPdf package to generate PDF:

PDF软件包

如何为该"Temp"文件夹赋予可写权限,我无法在代码中找到它,并且在服务器上它也不位于上述路径中的任何位置.谢谢!

How can I give writable permissions to that 'Temp' folder, i can't find it in code and on server it's also not located anywhere in the path above. Thanks!

推荐答案

  1. 在公共场所创建指令
  2. 在config/pdf.php中将'tempDir'=> base_path('../temp/')更改为'tempDir'=> public_path('temp')
  3. 授予该文件夹777的权限.

这篇关于临时文件目录"/var/www/html/activate/../temp/"在实时服务器上不可写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 05:48