PHP code example of bgaze / php-dotenv
1. Go to this page and download the library: Download bgaze/php-dotenv 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/ */
bgaze / php-dotenv example snippets
use \Bgaze\Dotenv\Helpers as DotEnv;
try {
var_dump(DotEnv::fromString('a dotenv string', [ /* some default values */ ]));
var_dump(DotEnv::fromFile('path/to/dotenv/file', [ /* some default values */ ]));
} catch (\Exception $e) {
echo "<pre>{$e}</pre>";
}
composer