PHP code example of koshatul / config

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

    

koshatul / config example snippets


Config::Get('project/apikey')

use Koshatul\Config\Config;

$value = Config::Get('project/apikey');

print_r($value);

$array = array(
	'driver'   => 'pdo_mysql',
	'host'     => Config::GetMySQLURI('project/db', PHP_URL_HOST),
	'dbname'   => Config::GetMySQLURI('project/db', PHP_URL_PATH),
	'user'     => Config::GetMySQLURI('project/db', PHP_URL_USER),
	'password' => Config::GetMySQLURI('project/db', PHP_URL_PASS),
	'port'     => $port,
);

print_r($array);