1. Go to this page and download the library: Download donsimon/alt-brite-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/ */
use Brite\Config\Config;
// Registering as the 'default' config means you can grab the config
// without specifying a name.
Config::register('default', __DIR__ . '/test_config/config.php', 'staging');
use Brite\Config\Config;
// This grabs the config registered as 'default'
$config = Config::instance();
echo $config->get('database.host');
// output: "bar"
echo $config->get('database.user');
// output: "foo1"
use Brite\Config\Config;
// This grabs the config registered as 'database'
$dbConfig = Config::instance('database');
echo $dbConfig->get('host');
echo $dbConfig->get('user');
use Brite\Config\IniConfig;
$config = new IniConfig('/path/to/file.ini', 'staging');
// Now register $config with your registry
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.