PHP code example of lovelock / yafconf

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

    

lovelock / yafconf example snippets


class Bootstrap extends Yaf\Bootstrap_Abstract
{

    public function _initLoader(Dispatcher $dispatcher)
    {
        

Conf::get('database.database.host')
ini
; database.ini
[product]
database.dbtype=mysql
database.host=127.0.0.1
database.port=3306
database.dbname=ttlive
database.user=root
database.password=root
database.charset=utf8

[dev : product]
database.host=192.168.1.103


array (
    'dbtype'   => 'mysql',
    'host'     => '192.168.1.103',
    'port'     => '3306',
    'dbname'   => 'ttlive',
    'user'     => 'root',
    'password' => 'root',
    'charset'  => 'utf8',
)