PHP code example of ialopezg / config

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

    

ialopezg / config example snippets


use ialopezg\Libraries\Config\Config;

$config = Config::load('database.php');

// Get the value
echo $config->get('database.connections.default.db_driver');
// Change the value
$config->set('database.connections.default.db_driver', 'MSSQL');
// Print new value
echo $config->get('database.connections.default.db_driver');

// Write the file
$config->toFile('database.php');