运行dev win 7机器。
尝试使用laravel存储文件时:
$file_store ='/srt/SiteName/df01c6a46702639c/0f3e86c003030527.srt
$file_data = srt file content
Storage::put($file_store, $file_data)
我收到以下错误:
file_put_contents(E:\Projects\2017\releases\storage\app\srt/SiteName/df01c6a46702639c/0f3e86c003030527.srt"): failed to open stream: No such file or directory
当我检查本地磁盘时,它确实创建了以下目录:
SiteName/df01c6a46702639c/
但它只是不存储文件,任何想法?
答案 0 :(得分:0)
您可以这样使用:
Storage::disk('local')->put($file_store, $file_data);