定制 nigr/dotenv 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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
  • 点击次数: 2
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-13