PHP code example of genesis / config

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

    

genesis / config example snippets



const ENVIRONMENT = 'development';
const PATH = __DIR__ . '/allJsonConfigs/';

$config = new Config(self::PATH, self::ENVIRONMENT);
$dbname = $config->set('database')->get('name');
$username = $config->get('username');
$password = $config->get('password');