我试图让我的网站上传video和图片。 由于我已经制作了更多上传图片的网站,所以在这方面没有任何问题,但是当我尝试上传某个video时,无法在包含上传图片的$_FILES数组中find它。
我已经google了一下,发现了关于php.ini文件和包含最大上传大小的IIS 7的内容。 这些都设置为1024M:
在php.ini中:
max_execution_time = 1000 max_input_time = 1000 memory_limit = 256M upload_max_filesize = 1024M post_max_size = 1024M
在IIS 7中:
maxAllowedContentLength = 1073741824 maxRequestLength = 1073741824
经过一些testing,看起来真的很小的video文件可以工作(192KB),但是稍微大点不会显示在$ _FILES数组(11MB)中,但真正的大文件(80MB)会给出错误: The request filtering module is configured to deny a request that exceeds the request content length. 。 问题是我已经将maxAllowedContentLength设置为1GB。 所以这不应该发生?! 这个图像如下:
图片

任何帮助或build议是非常appriciated!
HTTP错误404.13意味着IIS7请求过滤模块正在杀死请求,因为请求太大。
正确的方法是通过在站点的web.config的system.webServer > security > requestFilteringconfiguration部分configurationmaxAllowedContentLength值。
例如:
<configuration> <system.webServer> <security> <requestFiltering> <!-- Allow 100MB requests --> <requestLimits maxAllowedContentLength="100000000" /> </requestFiltering> </security> </system.webServer> </configuration>
有关更多信息,请参阅
请求限制 – IIS.NET
我必须编辑C:\Windows\System32\inetsrv\config\applicationHost.config文件并将<requestLimits maxAllowedContentLength="1073741824" />到…
<configuration> <system.webServer> <security> <requestFiltering>
部分