请教post_max_size最大到底能设多大
请问post_max_size最大到底能设多大?
最近做一个项目,做资源上传的模块时,我想肯能上传较大的文件,所以我在php.ini中设置如下
max_execution_time = 600
upload_max_filesize=2048M
max_input_time = 600
memory_limit = 2048M
post_max_size = 2048M
但是表单提交后,确没有任何反应。
最后发现$_FILE为NULL,没有值!
再后来发现当设置为post_max_size = 1536M后就又可以正常上传了!
难道post_max_size有上限吗?那么最大可以设置为多大呢?(我这里好像是2G)
如果真有的话,那如果要上传很多G的东西要怎么实现呢?
请各位大哥指点一下啊!我准备这个项目做完就去找工作的……再不找过年后就没地去了啊……
大家救救我吧!
------解决方案--------------------
多大可能没有限,但是你除了设置大小 是不是对延时之类的参数也需要做相应的增加。
所以大的文件切割成几个部分来上传 到了服务器上再组合起来,这样解决各种稀奇古怪的问题。。。
------解决方案--------------------
2G用post传
32位机子限制4g以内操作
64位也就8g吧
还可以看看这段说明:
Note: PHP allows shortcuts for bit values, including K (kilo), M (mega) and G (giga). PHP will do the conversions automatically if you use any of these. Be careful not to exceed the 32 bit signed integer limit (if you’re using 32bit versions) as it will cause your script to fail.
------解决方案--------------------
真的要这么大吗?真的吗?真的吗?
------解决方案--------------------
可以设置为很大。但是,很难使用到那么大。看自己的需要,看自己服务器的承受能力。
------解决方案--------------------
虽然你的文件没有2G,可能配置文件中设置2G以上就有问题了
------解决方案--------------------
有符号长整形正数的上限是 2G,16进制表示为 0x80000000
这可能是问题的所在
另外,涉及到得几个参数应该协调
memory_limit > post_max_size >= upload_max_filesize
upload_max_filesize
且合理
按你的配置
max_execution_time = 600
upload_max_filesize=2048M
max_input_time = 600
memory_limit = 2048M
post_max_size = 2048M
需要网速达到 3.4M字节每秒,并且需10分钟上传时间
没有一个用户会接受这一现状的

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Use Java's File.length() function to get the size of a file. File size is a very common requirement when dealing with file operations. Java provides a very convenient way to get the size of a file, that is, using the length() method of the File class. . This article will introduce how to use this method to get the size of a file and give corresponding code examples. First, we need to create a File object to represent the file we want to get the size of. Here is how to create a File object: Filef

iPhone 15 Pro vs. iPhone 14 Pro: Specs Comparison Here is a spec comparison between iPhone 15 Pro Max and iPhone 14 Pro Max: iPhone 15 Pro Max iPhone 14 Pro Max Display size 6.7 inches 6.7 inches Display technology Super Retina 2,000 nits Dimensions 6.29x3.02x0.32 inches 6.33x3.06x0.31 inches Weight 221 grams 240 grams

For PHP developers, using POST to jump to pages with parameters is a basic skill. POST is a method of sending data in HTTP. It can submit data to the server through HTTP requests. The jump page processes and jumps the page on the server side. In actual development, we often need to use POST with parameters to jump to pages to achieve certain functional purposes.

Today we are mainly going to take a look at the time application method of golang time package. The general rule between the two is that "wall time" is used to tell time, and "monotonic clock" is used to measure time; there are other clock processing methods.

Python simulates the browser sending post requests importrequests format request.postrequest.post(url,data,json,kwargs)#post request format request.get(url,params,kwargs)#Compared with get request, sending post request parameters are divided into forms ( x-www-form-urlencoded) json (application/json) data parameter supports dictionary format and string format. The dictionary format uses the json.dumps() method to convert the data into a legal json format string. This method requires

PHP is a widely used server-side scripting language that can be used to create interactive and dynamic web applications. When developing PHP applications, we usually need to submit user input data to the server for processing through forms. However, sometimes we need to determine whether form data has been submitted in PHP. This article will introduce how to make such a determination.

The latest iPhone Pro series is equipped with a powerful 48MP sensor that ensures highly detailed and crystal clear photos to capture every precious moment. However, one potential drawback is the size of full-resolution images, especially those in ProRAW format. Although the maximum storage space offered by the iPhone is 512GB, capturing a lot of ProRAW images (about 75MP each) and video (440MB per minute, 60FPS) can quickly eat up your storage space. This can cause problems if you plan to use your iPhone as your main camera for large projects or travel. But wouldn't it be great if you could take those high-resolution 48MP photos without worrying about storage limitations? it's quick

1. Java calls post interface 1. Use URLConnection or HttpURLConnection that comes with java. There is no need to download other jar packages. Call URLConnection. If the interface response code is modified by the server, the return message cannot be received. It can only be received when the response code is correct. to return publicstaticStringsendPost(Stringurl,Stringparam){OutputStreamWriterout=null;BufferedReaderin=null;StringBuilderresult=newSt
