Manuel:$IP

From MediaWiki.org
Jump to: navigation, search
This page is a translated version of the page Manual:$IP and the translation is 9% complete.

Other languages:
català • ‎Deutsch • ‎English • ‎español • ‎suomi • ‎français • ‎italiano • ‎日本語 • ‎polski • ‎português • ‎português do Brasil • ‎русский • ‎中文
Paths: $IP
The full path to the installation directory.
Introduit dans la version: pre 1.1.0
Retiré dans la version: still in use
Valeurs autorisées: String containing an absolute path.
Valeur par défaut: The MW_INSTALL_PATH environment variable, or if not set, the current working directory

Autres paramètres: Alphabétique | Par Fonction

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.

Détails[edit | edit source]

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.

Unlike other variables, the default is set in WebStart.php instead of 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).