PHP code example of reagordi / env
1. Go to this page and download the library: Download reagordi/env 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/ */
reagordi / env example snippets
(Dotenv\Dotenv::createImmutable(__DIR__))->load();
$s3_bucket = env('S3_BUCKET', 'default');
$s3_bucket = getenv('S3_BUCKET');
$s3_bucket = $_ENV['S3_BUCKET'];
$s3_bucket = $_SERVER['S3_BUCKET'];