PHP code example of janisto / env

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

    

janisto / env example snippets


php composer.phar 


 = new \janisto\env\Environment(dirname(__DIR__) . '/config');
// $env->config // environment configuration array


 = new \janisto\env\Environment([
    dirname(__DIR__) . '/common/config',
    dirname(__DIR__) . '/backend/config'
]);
// $env->config // environment configuration array

#!/usr/bin/env php


Environment(__DIR__ . '/config');
// $env->config // environment configuration array

export APP_ENV='dev' && ./cli.php