PHP code example of truecastdesign / config

1. Go to this page and download the library: Download truecastdesign/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/ */

    

truecastdesign / config example snippets


<?

# composer autoloader
files into Config object
$TAConfig = new \Truecast\Config('/path/to/config/mysql.ini'); # standard path: __DIR__.'/../app/config/mysql.ini'

# can load multiple config files at once with a comma between. Example: '/path/to/config/mysql.ini, /path/to/config/site.ini'

echo $TAConfig->mysql->username; # this would output the string "root" using the above config file.

config_title="items"

[secion_title]
name="The Name"
version="1.0"
date="2017-02-12"
show=true
sort=2

[secion_title_two]
name="The Name"
version="1.0"
date="2017-02-12"
show=true
sort=2

echo $TAConfig->items->secion_title_two->version;