PHP code example of light / yii2-offline
1. Go to this page and download the library: Download light/yii2-offline library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
light / yii2-offline example snippets
public function actions()
{
return [
'offline' => [
'class' => 'light\Offline\OfflineAction',
'title' => '维护中',
'description' => '服务器正在维护中, <br /> 请稍后访问',
]
];
}
...
'catchAll' => ['site/offline']
...
php composer.phar