php image upload errors [duplicate]

2019-01-29 09:19发布

This question is an exact duplicate of:

Im using Zend Framework in cms .I can upload below 70kb image size but can't upload above 70kb image
errors in browser

browser response Post image failed and sometimes failed to load resource

how to solve this issue

1条回答
ゆ 、 Hurt°
2楼-- · 2019-01-29 09:45

Most often, when your ini upload settings are fine, the other problem is the temp upload directory. By default, this is the /tmp folder. If you do not have enough space in your tmp directory or there are other limitations, you may run into this issue.

Check your php.ini setting "upload_tmp_dir" - also check the location where that is set.

Perhaps, if you're in a shared hosting environment, you're not allowed that much room in tmp. You may want to change that directory to a different directory in your home directory, but NOT publicly accessible to the web. Of course, don't forget to use move_uploaded_file() to make sure that the processed file isn't duplicated in your home directory AND in wherever you store it.

查看更多
登录 后发表回答