Azure使用php上传大文件

时间:2016-07-31 20:06:42

标签: php azure web-config

即时通讯使用Azuer网络应用程序,我试图使用PHP代码正常的PHP代码上传大文件,所以如果我上传小文件,如12 MB,它将成功上传,但如果我尝试更大的结果是“你正在寻找的资源for已被删除,其名称已更改,或暂时不可用“

所以编辑php.ini

display_errors=On
memory_limit = 5920M
upload_max_filesize= 5120M
post_max_size =5220M
max_input_time = 6000000
max_execution_time = 600000000

也.user.ini

; Example Settings
display_errors=On
memory_limit = 5920M
upload_max_filesize= 5120M
post_max_size =5220M
max_input_time = 6000000
max_execution_time = 600000000

和web.config

<httpRuntime executionTimeout="99999999" maxRequestLength="2000000000" />

我还启用了web.config中需要的文件扩展名

结果是相同的消息,所以请我帮忙。

1 个答案:

答案 0 :(得分:0)

就我而言,除了向.user.ini添加php设置外,我还必须更新IIS web.config

<system.webServer>
  <security>
    <requestFiltering>
      <requestLimits maxAllowedContentLength="1000000000" />
    </requestFiltering>
  </security>
</system.webServer>