1. Go to this page and download the library: Download jaxwilko/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/ */
jaxwilko / simple-config example snippets
use SimpleConfig\Compiler;
use SimpleConfig\Section;
$compiler = new Compiler();
$section = new Section();
$section->title = 'Database';
$section->key = 'database';
$section->comment = 'This is where your database config goes.';
$section->value = ['mysql' => ['host' => 'localhost']];
$compiler->addSection($section);
echo $compiler->render();
return [
/*
|----------------------------------------
| Database
|----------------------------------------
| This is where your database config goes.
|
*/
'database' => [
'mysql' => [
'host' => 'localhost',
],
],
];
$compiler = new Compiler();
$compiler->addSection(new Section([
'title' => 'Database',
'key' => 'database',
'comment' => 'This is where your database config goes.',
'value' => ['mysql' => ['host' => 'localhost']],
]));
echo $compiler->render();
$compiler = new Compiler();
$compiler->addSection(new Section([
'title' => 'Database',
'comment' => 'This is where your database config goes.',
]));
echo $compiler->render();
return [
/*
|----------------------------------------
| Database
|----------------------------------------
| This is where your database config goes.
|
*/
];