允許或禁止上傳的檔案類型:

請 在 LocalSettings.php這個檔案中輸入底下的程式碼:

首先請您先確認$wgEnableUploads = true;(代 表啟動檔案上傳的功能)

預設容許的檔案類型:

  • $wgFileExtensions = array('png','gif','jpg','jpeg');
  • 預設禁止的檔案類型:

  • $wgFileBlacklist = array('htm','jsp','pl','exe','php');
  • 其他常見的檔案類型:

    文件: Plain text (.txt), Microsoft Word (.doc), Rich Text (.rtf), OpenDocument Text (.odt), StarOffice (.sxw), Portable Document Format (.pdf) and Postscript (.ps).

    試算表: Comma Separated Value (.csv), Microsoft Excel (.xls) and OpenDocument Spreadsheet (.ods).

    簡報: Microsoft Powerpoint (.ppt) and OpenDocument Presentation (.odp)

    聲音: MPEG-1 Audio Layer 3 (.mp3), Ogg Vorbis (.ogg), Real Audio (.rm) and Waveform (.wav)

    心智繪圖: FreeMind (.mm)

    壓縮檔: 7-Zip (.7z), WinRAR (.rar) and ZIP (.zip)