luar/maintenance-screen

管理维护屏幕

v1.1.0 2019-10-08 18:34 UTC

This package is not auto-updated.

Last update: 2024-09-29 02:50:30 UTC


README

version code-size code license packagist downloads

此包允许您为您的网站启用维护屏幕。

安装

composer require luar/maintenance-screen

使用方法

要在您的项目中使用它,只需将以下内容包含在网站的index.php文件中

use Luar\MaintenanceScreen;

$maintenance = new MaintenanceScreen(array(
	'enable' => true,
	'visible_hosts' => array()
));

$maintenance->load();

文档

以下选项可以作为关联数组发送到load()函数。

'enable' => false, // enable or disable the screen

// ip addresses that can continue to see the web even though it is active
'visible_hosts' => array (
    'localhost',
    '192.168.1.33'
), 

// optionals
'flag' => 'maintenance.flag', // Activated or deactivated based on the existence of file
'img_path' => 'maintenance.jpg', // Show the indicated image
'title' => 'Maintenance title', // Show the title written
'text' => 'This site is in testing.', // Shows the indicated text
'css_path' => 'style.css', // Includes custom style sheet
'bgcolor' => 'black' // Modifies the background of the screen
'language' => 'ES' // To change the default language to Spanish