1. Go to this page and download the library: Download loilo/simple-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/ */
loilo / simple-config example snippets
use Loilo\SimpleConfig\Config;
$config = new Config();
$config->set('foo', 'bar');
$config->get('foo') === 'bar';
// Use dot notation to access nested options
$config->set('baz.qux', true);
$config->get('baz') === [ 'qux' => true ];
$config->delete('foo');
$config->get('foo') === null;
use Loilo\SimpleConfig\StaticConfig;
use Loilo\SimpleConfig\Config;
class AppConfig extends StaticConfig
{
public static function createConfig(): Config
{
return new Config();
}
}