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.
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.