手册:$IP
路径: $IP | |
---|---|
安装目录的完整路径 |
|
引入版本: | pre 1.1.0 |
移除版本: | still in use |
可用值: | 包含绝对路径的字符串 |
默认值: | MW_INSTALL_PATH 环境变量,如果没有设置则为当前工作目录 |
Setting this variable to the absolute path to MediaWiki on disk from LocalSettings.php was necessary in older versions of MediaWiki. However at least since MediaWiki 1.18, setting $IP in LocalSettings.php is no longer needed. It will default to the current working directory. If there is an environment variable named MW_INSTALL_PATH defined, its value will be used instead.
细节
IP stands for Install Path. The variable holds the local file path to the base installation of your wiki. Make sure you refer to the fully qualified file path. Do not include a slash at the end of the path.
In MediaWiki 1.16 and prior, where the DefaultSettings.php file still had to be loaded from inside LocalSettings.php, the directory to load it from was determined by the IP variable.
与其他变量不同,该默认值定义于WebStart.php而不是DefaultSettings.php。
Setting the MW_INSTALL_PATH environmental variable can sometimes be useful when running maintenance scripts that are in non-standard directories. (Maintenance scripts by default use the parent of the current working directory as $IP).