Jump to content

手册:getConfiguration.php

From mediawiki.org
This page is a translated version of the page Manual:GetConfiguration.php and the translation is 30% complete.
MediaWiki版本:
1.23

详情

getConfiguration.php文件是一个打印MediaWiki配置变量的序列化输出的维护脚本

Options

Option Description Required? Default
--regex Regular expression to filter variables with Optional
--iregex Same as --regex but case insensitive Optional
--settings Space-separated list of wg* variables Optional
--format Output format. Either json, php, serialize or vardump. Optional php


Usage

php maintenance/run.php getConfiguration [ --regex regex | --iregex regex | --settings list ] [ --format format ]
在MediaWiki MediaWiki 1.39 及更早版本中,您必须通过php maintenance/脚本名称.php调用维护脚本,而不是php maintenance/run.php 脚本名称

With --settings

Terminal

With --regex

Terminal
Use JSON_PARTIAL_OUTPUT_ON_ERROR (--json-partial-output-on-error) flag with json_encode(). This allows for partial response to be output in case of an exception while serializing to JSON. If an error occurs, the wgGetConfigurationJsonErrorOccurred field is set in the output.
Terminal

See also