1. Go to this page and download the library: Download nimayneb/advini 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/ */
nimayneb / advini example snippets
use JBR\Advini\Advini;
$ini = new Advini();
$configuration = $ini->getFromFile("local.ini");
var_dump($configuration);
use JBR\Advini\Advini;
$ini = new Advini();
$configuration = $ini->getFromFile("local.ini");
var_dump($configuration);
use JBR\Advini\Advini;
use JBR\Advini\Instructor\ConstantInstructor;
$ini = new Advini();
$const = $ini->getInstructor(ConstantInstructor::class);
$const->setConstantsFromFile("constants.ini");
$configuration = $ini->getFromFile("local.ini");
var_dump($configuration);
use JBR\Advini\Advini;
use JBR\Advini\Methods\Base;
$ini = new Advini(new Base());
try {
$configuration = $ini->getFromFile("local.ini");
var_dump($configuration);
} catch (AdviniException $e) {
echo $e->getMessage();
}