MediaWiki file: | index.php|
---|---|
Location: | / |
Source code: | master • 1.40.0 • 1.39.4 • 1.35.11 |
Classes: | Find code • Find documentation |
index.php is the main access point for a MediaWiki site. The other main access point is api.php
which handles requests for the MediaWiki API .The URL of index.php can be customized using $wgScript
.Actions taken
MediaWiki version: | ≥ 1.18 |
Most requests result in the following actions in index.php
:
- Ensure the version of PHP is supported, otherwise display an error.
- First, it includes WebStart.php , which mainly just includes Setup.php . This in turn sets up the PHP environment for MediaWiki, such as installing the class autoloader, including the vendor dependencies loading DefaultSettings.php , and applying the site's LocalSettings.php file.
- Next, it instantiates the MediaWiki class from MediaWiki.php , which is responsible for interpreting URL parameters like "title" and "action" to determine what the current request should do. It then dispatches the relevant Action subclass to do that thing.
- Finally,
MediaWiki::restInPeace()
is called, which does things like closing database transactions, and running any deferred updates .
See also
- Manual:Code
- Manual:Parameters to index.php
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.