开发者

How to increase my upload limit in php

开发者 https://www.devze.com 2023-01-14 20:12 出处:网络
I read so many articles out there in the internet and found that to change 开发者_运维知识库the php.ini file to upgrade the upload limit. But I do all the suffs and cant upload more than 10mb of files

I read so many articles out there in the internet and found that to change 开发者_运维知识库the php.ini file to upgrade the upload limit. But I do all the suffs and cant upload more than 10mb of files or so.

I am trying to add a feature to upload video file through the front end for users. But failed for some reason

Is there any other way to do it. Or is it because it is a video file or some thing like that


Make sure that you have (in php.ini, .htaccess, etc.):

  • increased post_max_size to at least twice the max file size that you might need to upload

  • increased upload_max_filesize to the max file size that you might want to upload

  • increased memory_limit to something bigger than post_max_size


On top of setting php.ini

upload_max_filesize = 200M
post_max_size = 200M

I owuld look into a flash uploader like uploadify. It will make your life much easier trust me.


Since you are changing the php.ini, are you restarting the webserver so that the changes take effect (if using mod_php)? Does the webserver itself have any restrictions set?


It's been a while since I've done this, but in my php.ini I have upload_max_filesize = 200M and I have post_max_size = 200M

I also set max_execution_time = 3000 If this is set too low, it'll cut off while the user is still uploading. You should also bump up max_input_time and memory_limit

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号