PHP code example of gaming-engine / dotenv-writer
1. Go to this page and download the library: Download gaming-engine/dotenv-writer library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
gaming-engine / dotenv-writer example snippets
use GamingEngine\DotEnv\Writer;
(new Writer())
->load(__DIR__.'./.env') // Loads an existing file
->setValue('config', 'hello') // Overrides the value
->write(__DIR__.'./.env'); // Writes it back out to disk