手册:$wgUploadDirectory

This page is a translated version of the page Manual:$wgUploadDirectory and the translation is 100% complete.
服务器URL及文件路徑: $wgUploadDirectory
上传目录的文件系统路径。
引进版本:pre 1.1.0
移除版本:仍在使用
允许的值:(绝对路径)
默认值:"{$IP }/images" (1.8+)
"{$IP }/upload" (pre 1.1.0 - 1.7)
(Note: The default value of this variable depends on other variables, such as the values set in Setup.php , after LocalSettings.php is executed)

详情

存储上传文件的文件系统路径。

如果修改了該變數,您可能需要相應更新$wgUploadPath

目标文件夹需要讓網站伺服器可写入。 参见Manual:Configuring file uploads#Check directory security.

默认下,上传的文件实际存储在$wgUploadDirectory的子文件夹中。 参见手册:配置文件上传#检查目录安全性以获取更多信息,包括如何禁用此行为。

還有其他變數是依照這個變數來定義的。 如果您在您的LocalSettings.php 中重新定義該變數,則包括$wgUploadPath 的所有相關變數都需要重新定義。 如果這兩個變數不一致,檔案將會被上傳到不同的目錄($wgUploadDirectory),而不是MediaWiki在檢視檔案時嘗試讀取的目錄($wgUploadPath)!

參見