PHP code example of heropoo / config

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

    

heropoo / config example snippets



re_once './Exception.php';

use Moon\Config\Config;

$config = new Config('/path/to/config/dir');

//if get charset in app.php return 
$charset = $config->get('app.charset');

// the second parameter is if throw a exception
// when this config is not defined
$charset = $config->get('app.charset', true);