nigr/dotenv
Composer 安装命令:
composer require nigr/dotenv
包简介
for parsing .env files
README 文档
README
Install library:
composer require nigr/dotenv:@dev
Call function than parsed ENV-file:
use Nigr/Dotenv; $dotenv = new Dotenv(); $dotenv->parse();
If file locates not in root folder, pass as argument path to file in function envPasre():
$dotenv = new Dotenv(); $dotenv->parse("/env/.env.dev");
For call variable, can use $_ENV, $_SERVER and getenv():
$_ENV['DB_USER']; $_SERVER['DB_HOST']; getenv('DB_PORT');
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-07-13