PHP code example of claas / phpdotenvcache

1. Go to this page and download the library: Download claas/phpdotenvcache 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/ */

    

claas / phpdotenvcache example snippets




$dotenv = new Dotenv\CachedDotenv();
$dotenv->load(__DIR__);
// Alternatively, only load to $_ENV or $_SERVER globals:
// $dotenv->loadToEnv(__DIR__);
// $dotenv->loadToServer(__DIR__); 
bash
curl -sS https://getcomposer.org/installer | php

php composer.phar