dikki/dotenv

A simple dotenv library for PHP

2.0.0 2024-11-22 06:35 UTC

This package is auto-updated.

Last update: 2025-02-22 07:12:04 UTC


README

A simple dotenv component for PHP.

Usage

$dotenv = new Dikki\DotEnv\DotEnv(__DIR__, '.env'); // directory where .env is present; second argument is optional
$dotenv->load(); // load the vars from .env file

echo $_ENV['DEBUG']; // or getenv('DEBUG')