使用php.ini增加PHP的文件上传限制

The file upload size limit is usually set pretty low by shared hosting providers. Why? To save bandwidth, keep the server moving quickly, and think about it -- how many customers really need a large upload limit? If you do need to increase the maximum upload limit, all you need to do is place the following code snippet in your php.ini file:

共享主机提供商通常将文件上传大小限制设置得非常低。 为什么? 为了节省带宽,请保持服务器快速运行,然后再考虑-多少客户真正需要较大的上传限制? 如果确实需要增加最大上传限制,则只需将以下代码段放入php.ini文件中:


file_uploads = On
upload_max_filesize = 10M //needs to be in {x}M format


Note that not all hosting providers allow customers to increase the file upload limit. Take that into consideration when purchasing your customer's web hosting.

请注意,并非所有托管服务提供商都允许客户提高文件上传限制。 购买客户的虚拟主机时要考虑到这一点。

翻译自: https://davidwalsh.name/increase-php-file-upload-limit-using-php-ini

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值