dlu / dluphpsettings
此包已被弃用且不再维护。未建议替换包。
ZF2模块,用于根据配置数据设置PHP ini设置
0.1.1
2013-03-11 13:13 UTC
Requires
- zendframework/zendframework: >=2.0.5
This package is not auto-updated.
Last update: 2018-12-08 00:09:45 UTC
README
简介
DluPhpSettings是一个Zend Framework 2模块,用于根据配置数据设置PHP ini设置。
更多信息
您可以在我的博客ZF Daily上找到更多关于此模块的信息和讨论:[在ZF2中配置PHP ini设置](http://www.zfdaily.com/2012/04/configuring-php-settings-in-zf2/)
安装 - 手动
- 转到您的项目目录。
将此项目作为
DluPhpSettings
模块克隆到您的./vendor
目录git clone https://bitbucket.org/dlu/dluphpsettings.git ./vendor/DluPhpSettings
按照以下安装后的步骤进行
安装 - 使用Composer
- 转到您的项目目录。
- 编辑您的
composer.json
文件,并在require
部分添加"dlu/dluphpsettings": "dev-master"
。 - 运行
php composer.phar install
(或php composer.phar update
)。 - 按照以下安装后的步骤进行
安装后的步骤
在您的应用配置文件
<your app>/config/application.config.php
中启用DluPhpSettings模块- 在
modules
下添加'DluPhpSettings',
- 在
用法
将任何允许的PHP ini设置放入配置文件中的phpSettings
键下
/* Global application configuration in /config/autoload/global.php */
<?php
return array(
'phpSettings' => array(
'display_startup_errors' => false,
'display_errors' => false,
'max_execution_time' => 60,
'date.timezone' => 'Europe/Prague',
'mbstring.internal_encoding' => 'UTF-8',
),
);
您可以在PHP文档中找到可用的PHP ini指令列表。
使用全局配置文件进行全局应用程序配置,使用局部配置文件进行仅与本地环境相关的设置。
链接
- DluPhpSettings - BitBucket上的git仓库
- 在ZF2中配置PHP ini设置 - 关于此模块的博客文章