sheridan/zf2-maintenance-mode

该软件包已被 弃用 并不再维护。未建议替代软件包。

一个简单的 ZF2 维护模式插件。启用后显示计划维护页面,支持允许的 IP 地址。

dev-master 2022-10-04 11:31 UTC

This package is not auto-updated.

Last update: 2022-10-10 23:22:29 UTC


README

zf2MaintenanceMode

简介

一个简单的 ZF2 维护模式插件。启用后显示计划维护页面,支持允许的 IP 地址。

安装

使用 composer

  1. sheridan/zf2-maintenance-mode (版本 dev-master) 添加到需求中
  2. 在 composer 上运行 update 命令
  3. zf2MaintenanceMode 添加到您的 application.config.php 文件中

手动

将此项目克隆到您的 ./vendor/ 目录中,并在您的 application.config.php 文件中启用它。

需求

PHP >= 5.3.3

配置

创建一个包含以下内容的 config/maintenance.global.php 文件

```
	<?php
	return array(
		'zf2MaintenanceMode' => array (
		'enabled' => true,
		'retry-after' => 3600,
		'allowed' => array(
			'127.0.0.1',
		),
	);
```

功能

  1. index.phtml 文件内容
  2. layout.phtml 覆盖全局网站布局