Manual:index.php
Appearance
MediaWiki ファイル: index.php | |
---|---|
場所: | / |
ソース コード: | master • 1.42.3 • 1.41.4 • 1.39.10 |
クラス: | コードを検索 • 説明文書を検索 |
index.phpはMediaWikiサイトの主なアクセスポイントです。他の主なアクセスポイントはapi.php で、MediaWiki API のリクエストを処理します。
The URL of index.php can be customized using $wgScript .
起こる動作
MediaWiki バージョン: | ≧ 1.18 |
ほとんどのリクエストは、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, default configuration, 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 .