與檔案上傳有關的php配置參數總結_PHP教程

來源:互聯網
上載者:User
搞個了圖片上傳,死活不好使,後來發現是php參數配置的問題。
下面總結下與檔案上傳有關的php參數,備忘之~
所有這些參數都在php.ini中設定。

1.file_uploads
設為On,允許通過HTTP上傳檔案

2.upload_tmp_dir
檔案上傳至伺服器時用於臨時儲存的目錄,如果沒指定,系統會使用預設的臨時檔案夾(我的機器是/tmp)。

3.upload_max_filesize
允許上傳檔案大小的最大值,預設為2M。

4.post_max_size
Php可接收的post資料的最大值(包括表單裡的所有值的總合),預設為8M。

5.memory_limit
每個php所最占的最大記憶體數,這個值要大於允許上傳的檔案大小。

6.max_execution_time
每個php啟動並執行最長時間(秒),預設30秒。

7.max_input_time
Php解析POST/GET資料的最長時間(秒),預設60秒。This sets the maximum time in seconds a scripts is allowed to parse input data, like POST and GET.It is measured from the mement of receiving all data on the server to the start of script execution.

http://www.bkjia.com/PHPjc/327620.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/327620.htmlTechArticle搞個了圖片上傳,死活不好使,後來發現是php參數配置的問題。 下面總結下與檔案上傳有關的php參數,備忘之~ 所有這些參數都在php.ini中設...

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.