1. Go to this page and download the library: Download php-strict/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/ */
php-strict / config example snippets
use PhpStrict\Config\Config
class AppConfig extends Config
{
/**
* Project root
*
* @var string
*/
public $root = '/';
/**
* Debug enable|disable
*
* @var bool
*/
public $debug = false;
/**
* Database settings
*/
public $dbServer = '';
public $dbUser = '';
public $dbPassword = '';
public $dbName = '';
public $dbCharset = '';
public $dbTablePrefix = ''
/*
* another configuration fields here
*/
}
$config = new AppConfig();
$config->loadFromFile('config.ini');