Skip to content

laarranz/maintenance-screen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MaintenanceScreen

version code-size code license packagist downloads

This package allows you to enable a maintenance screen for your website.

Installation

composer require luar/maintenance-screen

Usage

To use it in your project simply include the following in the index.php of the website:

use Luar\MaintenanceScreen;

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

$maintenance->load();

Documentation

The following options can be sent to load() in an associative array.

'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

About

Maintenance screen for any project in PHP

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages