Manual:DoMaintenance.php/ko
Appearance
| 미디어위키 버전: | ≥ 1.16 |
| 미디어위키 파일: doMaintenance.php | |
|---|---|
| 위치: | maintenance/ |
| 소스 코드: | master • 1.46.0 • 1.45.4 • 1.43.9 |
| 클래스: | 코드 검색 • 설명문서 검색 |
상세
doMaintenance.php file is a maintenance script to verify the most important files and run some jobs automatically.
사용법
When writing a maintenance script, add RUN_MAINTENANCE_IF_MAIN to the end of file.
<?php
require_once __DIR__ . '/Maintenance.php';
class HelloWorld extends Maintenance {
public function execute() {
$this->output( "Hello, MediaWiki Devs!" );
}
}
$maintClass = HelloWorld::class;
require_once RUN_MAINTENANCE_IF_MAIN;
Here RUN_MAINTENANCE_IF_MAIN loads doMaintenance.php file which autoloads MediaWiki classes and configuration to run the script smoothly.