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
DotenvEventis called duringBeforeBuildevent. 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
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2026-02-03