PHP code example of veka-server / config

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

    

veka-server / config example snippets


// initialise le singleton de configuration
\VekaServer\Config\Config::getInstance(__DIR__.'/config/config.php');

\VekaServer\Config\Config::getInstance()->getSetting('db_pass');

\VekaServer\Config\Config::getInstance()->get('db_pass');



return array(

    // Environnement
    "ENV"   => 'DEV', // DEV / PROD

    // BDD
    "db_user" => 'root',
    "db_pass" => 'root',
    "db_host" => 'localhost',
    "db_name" => 'mabase'

);