共享主机上的Laravel file_put_contents错误 [英] Laravel file_put_contents error on shared hosting

查看:81
本文介绍了共享主机上的Laravel file_put_contents错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了我的Laravel应用,并且正在共享主机上上传.显示错误:

I created my Laravel app and I am uploading on shared hosting. It's show error:

file_put_contents(D:\ xampp \ htdocs \ Laravel \ storage \ framework/sessions/FlEPsHNW7Rggfb9wvDZ71K7D2YQNNQK0epRBRQNW): 打开流失败:没有这样的文件或目录

file_put_contents(D:\xampp\htdocs\Laravel\storage\framework/sessions/FlEPsHNW7Rggfb9wvDZ71K7D2YQNNQK0epRBRQnW): failed to open stream: No such file or directory

这是我计算机上的文件夹.我读过同样的问题,但我在共享主机上,没有作曲家或工艺师来进行操作.

This is folder from my computer. I read same problems but I am on shared hosting and I don't have a composer or artisan for operations.

提前谢谢!

推荐答案

您应该做的是在应用程序中查找xampp的出现,因为似乎会话已写入与计算机上相同的文件夹,并且显然,该目录在Web服务器上不存在.

What you should do is looking for occurrences of xampp in your application because it seems you have sessions are written to same folder that you have on your machine and obviously such directory doesn't exist on web server.

尤其要确保您在session.php中拥有:

Especially make sure you in session.php you have:

'files' => storage_path('framework/sessions'),

并从bootstrap/cache目录中删除配置缓存,以防万一

and remove config cache from bootstrap/cache directory just in case

这篇关于共享主机上的Laravel file_put_contents错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆