papi/dotenv 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

papi/dotenv

Composer 安装命令:

composer require papi/dotenv

包简介

Dotenv Module

README 文档

README

PACKAGIST | GITHUB

Description

Load environment (.env) when building your PAPI. This module uses gitvlucas/phpdotenv under the hood.

Configuration

Constants

Name Required Type Default Description
DOTENV_PATH No String ".env" Directory where the .env file to load is located

Usage

DotenvEvent is called during BeforeBuild event. We recommend putting it first to avoid any mistakes.

use PAPI\Core\SlimBuilder;
use PAPI\Mod\Dotenv\DotenvEvent;

define("DOTENV_PATH", __DIR__ . DIRECTORY_SEPARATOR . ".env");

$builder = new SlimBuilder();

$builder
    ->addEvent(DotenvEvent::class)
    ->build()
    ->run();

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2026-02-03