claas / phpdotenvcache
A simple cached loader for Phpdotenv
v0.0.3
2017-03-31 16:33 UTC
Requires
- vlucas/phpdotenv: ^2.4
This package is not auto-updated.
Last update: 2025-03-30 04:40:17 UTC
README
A simple cached loader for PHP dotenv.
Usage
First, install Composer.
curl -sS https://getcomposer.org/installer | php
Next, add phpdotenvcache:
php composer.phar require claas/phpdotenvcache
Then, include Composer's autoloader:
require 'vendor/autoload.php';
Finally, you can use the PHP dotenv cache:
$dotenv = new Dotenv\CachedDotenv(); $dotenv->load(__DIR__); // Alternatively, only load to $_ENV or $_SERVER globals: // $dotenv->loadToEnv(__DIR__); // $dotenv->loadToServer(__DIR__);