Skip to content

K-Adam/php-env-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP .env editor

A .env file editor library for PHP.

Installation

Using Composer:

composer require k-adam/env-editor

Usage example

$envFile = \EnvEditor\EnvFile::loadFrom(__DIR__."/.env.example");

$envFile->setValue("exampleKey", "exampleValue");
$envFile->setValue("LOG_DIR", __DIR__."/logs");
// ...

$envFile->saveTo(__DIR__."/.env");