PHP Classes

File: usage/usage.php

Recommend this page to a friend!
  Classes of Miraz Mac   PHP DotEnv File Writer   usage/usage.php   Download  
File: usage/usage.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP DotEnv File Writer
Manage configuration files in the dotenv format
Author: By
Last change:
Date: 1 year ago
Size: 381 bytes


Class file image Download

use MirazMac\DotEnv\Writer;


$writer = new Writer(__DIR__ . '/' . '.env');

->set('APP_NAME', 'My App')
set('APP_URL', '')
// usage of an existing variable
->set('APP_DIR', '${BASE_DIR}/app')
// Force quote a single word value
->set('APP_BUCKET', 's3-bucket', true)
// Write the values to file