PHP code example of vencakrecl / nette-env

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

    

vencakrecl / nette-env example snippets


use Nette\Configurator;
use NetteEnv\NetteEnv;

$configurator = new Configurator();

$envs = new NetteEnv();
$envs
    ->add('MYSQL_HOST', 'mariadb')
    ->add('MYSQL_PORT', '3306')
    ->add('MYSQL_USER', 'root')
    ->add('MYSQL_PASSWORD', 'root')
    ->add('MYSQL_DBNAME', 'test');
    
$configurator->addDynamicParameters($envs->getEnvs());