找回密碼
 註冊
搜索
查看: 3977|回復: 0

IIS7 + PHP 上傳大檔問題

[複製鏈接]
發表於 2012-2-20 14:18:42 | 顯示全部樓層 |閱讀模式
IIS7 內定上傳限制為30MB,如果超過30MB,IIS會回傳404錯誤!
修正方法:
於web.config中加入以下內容中的 <requestFiltering> 段
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <configuration>
  3.   <system.webServer>

  4.      <!-- enables files up to 64MB -->
  5.      <security>
  6.           <requestFiltering>
  7.              <requestLimits maxAllowedContentLength="65536000" /> <!-- really? this is in bytes, not kb -->
  8.           </requestFiltering>
  9.      </security>

  10.   </system.webServer>
  11. </configuration>
複製代碼
PHP
修正方法:
修改php.ini,設定以下四個值
  1. upload_max_filesize = 64M
  2. post_max_size = 64M
  3. max_execution_time = 300
  4. max_input_time = 300
複製代碼
以上修改內容,以修改為上傳64MB為例!

Reference: http://refactored.tumblr.com/pos ... dpress-iis7-uploads
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

Archiver|手機版|彩色筆小沛的知識庫

GMT+8, 2024-4-20 00:42 , Processed in 0.020098 second(s), 9 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回復 返回頂部 返回列表