Manual:Wg variable/zh

wg 指的是MediaWiki软件中使用的一个重要的非常数编程元素，是“Wikipedia Global（维基百科全局）”的缩写(该名称早于MediaWiki Beyond的传播Wikipedia).

通常，软件中的任何全局变量(具有全局视野)的变量都具有此前缀，以便在编程时易于识别. 然而，不经意的黑客主要会在文件 和 中遇到这样的变量，这些变量定义了以各种方式控制软件行为的变量.

The  file stores the defaults for these values and should not be edited; the   file is used to override these values for a specific site &mdash; if a particular variable is not mentioned in your   file, copy the entry from   and amend as appropriate.

Confusingly, MediaWiki code (mainly in ) and extensions set a different (though overlapping) set of configuration variables in browser JavaScript, and many of these variables also have a wg prefix (without PHP's   sign). 有关列表，请参见Manual:Interface/JavaScript.

Starting with the introduction of the class in MediaWiki 1.23, the "wg" prefix for PHP global variables is being phased out as configuration settings are moving away from global scope.



參見

 * Manual:Coding conventions/PHP#Variables for other variable prefixes used in MediaWiki.
 * contains a list of all customization settings defined as global variables in MediaWiki. These can be configured in.
 * - lists some of the main global variables that aren't customization settings.