I am having a challenge uploading a file into app/storage
. Upon uploading the file I get this error:
file_put_contents(C:\xampp\htdocs\ProjectName\storage\app\folderName): failed to open stream: Permission denied
.
I tried using chmod -R 777 storage/app
, but still have the same problem.
Would really like know how to solve this problem.
答案 0 :(得分:2)
Make sure apache has write access to PHP's temp folder (C:\xampp\tmp\
usually) as well as all of storage
(not just storage/app). Also, be sure the uploads folder actually exists (C:\xampp\htdocs\ProjectName\storage\app\folderName
).
PHP first uploads files to the tmp folder, and then moves them into storage.