Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/divineomega/dotenv-loader
Automatically load in a `.env` file from the root of your project into environment variables
https://github.com/divineomega/dotenv-loader
dotenv environment environment-variables environment-vars php
Last synced: 3 months ago
JSON representation
Automatically load in a `.env` file from the root of your project into environment variables
- Host: GitHub
- URL: https://github.com/divineomega/dotenv-loader
- Owner: DivineOmega
- License: lgpl-3.0
- Created: 2017-01-13T11:18:12.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-11T19:25:14.000Z (almost 7 years ago)
- Last Synced: 2024-10-15T02:37:48.652Z (3 months ago)
- Topics: dotenv, environment, environment-variables, environment-vars, php
- Language: PHP
- Homepage:
- Size: 8.79 KB
- Stars: 5
- Watchers: 5
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dotenv-loader
The dotenv-loader is a simple PHP helper that automatically loads in a `.env` file
from the root of your project into environment variables. It is designed for use in
projects that do not already make use of a `.env` file.## Quick Start
Simple run `composer require DivineOmega/dotenv-loader` to install.
You'll then be able to create a `.env` file in your project's root directory
(in the same location as your `composer.json` file). Any variables in the
`.env` file can then be accessed in any way you wish, such as using PHP's built-in
`getenv` function.For an actual example of how to use `dotenv-loader`, see the [`test` directory](test/).