PHP code example of websk / php-config

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

    

websk / php-config example snippets




use WebSK\Config\ConfWrapper;

ConfWrapper::setConfig([
    'settings' => [
        'displayErrorDetails' => false,
        'database' => [
            'host' => 'localhost',
        ],
    ],
]);

$host = ConfWrapper::value('settings.database.host');
$port = ConfWrapper::value('settings.database.port', 3306);