PHP code example of thiphariel / config-file-loader
1. Go to this page and download the library: Download thiphariel/config-file-loader 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/ */
thiphariel / config-file-loader example snippets
// Create an instance of Config
$config = new Config();
// Load JSON configuration file
$config->load("config.json");
// Load PHP configuration file
$config->load("config.php");
// Getting values
$host = $config->get("host");
$port = $config->get("port");
// Nested keys
$env = $config->get("environment.dev");