PHP code example of flatphp / config

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

    

flatphp / config example snippets


composer 

use Flatphp\Config\BaseArray as Config
Config::set(array(
    'db' => array(
	'host' => 'localhost',
	'port' => '3306',
	'username' => 'test',
	'password' => '123456',
	'dbname' => 'test'
    ),

    'redis' => array(
	'host' => 'localhost',
	'port' => '6379'
    )
));

$db_config = Config::get('db');


use Flatphp\Config\BaseArray as Config
Config::set('key', 'value');