PHP code example of niletphp / configuration
1. Go to this page and download the library: Download niletphp/configuration 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/ */
niletphp / configuration example snippets
$config = new Nilet\Components\Configuration\Config();
$configDir = new Nilet\Components\FileSystem\Directory("path/to/config/files");
$config->setConfigDir($configDir);
$configDir = $config->getConfigDir();
/**
* Lets assume that there is a config file called foo.php inside the config directory
* with the following array
* [
* "bar" => true,
* "baz" => false
* ]
*/
$foo = $config->get("foo");
$foo["bar"];
$foo["baz"];