Web Server

IIS7 + PHP 上傳大檔問題
  • 1# JDP
  • 396402012-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
倒序瀏覽 看全部 全部回復
暫無回復,快來搶沙發
回復 收藏 轉播 分享 淘帖