php图片上传错误 [英] php image upload errors

查看:23
本文介绍了php图片上传错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 cms 中使用 Zend Framework.我可以上传小于 70kb 的图像大小,但不能上传大于 70kb 的图像图像
浏览器错误

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

如何解决这个问题

推荐答案

大多数情况下,当您的 ini 上传设置正常时,另一个问题是临时上传目录.默认情况下,这是/tmp 文件夹.如果您的 tmp 目录中没有足够的空间或存在其他限制,您可能会遇到此问题.

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.

检查您的 php.ini 设置upload_tmp_dir" - 还要检查设置的位置.

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

也许,如果您处于共享托管环境中,则 tmp 中不允许有那么多空间.您可能希望将该目录更改为您的主目录中的其他目录,但不能通过网络公开访问.当然,不要忘记使用 move_uploaded_file() 来确保处理后的文件不会在您的主目录和您存储它的任何位置重复.

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.

这篇关于php图片上传错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆