jsefton/php-dotenv-parser
最新稳定版本:1.0.0
Composer 安装命令:
composer require jsefton/php-dotenv-parser
包简介
Allows you get .env file as array and convert array back to .env file
README 文档
README
This easy tool allows you to pass a .env file and be returned a parsed array.
You can then add or edit values from this array.
This parser also allows you to pass an array and store as a valid .env file to be used.
Installation
You will need composer to install this package (get composer). Then run:
composer require jsefton/php-dotenv-parser
Usage
To parse a .env file to an array pass in the path like below:
$env = \Jsefton\DotEnv\Parser::envToArray('/path/to/.env');
To store an array into a .env file pass the array along with the path to store it:
\Jsefton\DotEnv\Parser::arrayToEnv($array, '/path/to/.env');
统计信息
- 总下载量: 7.63k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 1
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-08-07