【发布时间】:2020-01-01 00:32:37
【问题描述】:
我有一个 laravel 应用程序,我在 localhost 中上传图像它正在工作我使用存储目录的链接
php artisan storage:link
本地主机
当使用自己的控制器上传1张图片时,图片将存储在storage/app/public/posts/file1.jpg,同时图片将存储在root/public/storage/posts/file1.jpg => 效果很好。
但在在线服务器共享主机中 当我上传图片时它不起作用
图像将存储在 storage/app/public/posts/file1.jpg,但图像不存储在此处在 root/public/storage/posts/file1.jpg =>
【问题讨论】:
-
您上传网站时是否再次运行
php artisan storage:link? -
在在线服务器上上传后我没有这样做。而且我不知道在在线服务中运行这个命令
-
如果您无法访问 ssh,也许此链接可以帮助您 stackoverflow.com/questions/43575027/…
-
我这样做但同样的问题