1. Go to this page and download the library: Download alius/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/ */
alius / config example snippets
return [
'test' => 'this is a test',
];
$config = new \Alius\Config\Config('path_to_file.php');
print $config->get('test'); // => this is a test
$config = new \Alius\Config\Config([
'path_to_file1.php',
'path_to_file2.php',
]);
// file1.php
return [
'test' => 'one',
];
// file2.php
return [
'test' => 'two',
];
$config = new \Alius\Config\Config(['file1.php', 'file2.php']);
print $config->get('test'); // => two