[database] host = localhost user = vki pass = titok name = vmi
$config = parse_ini_file('config.ini'); $host = $config['host']; $user = $config['user']; $pass = $config['pass']; $name = $config['name']; ...
<?php define('HOST', 'localhost'); define('USER', 'vki'); define('PASS', 'titok'); define('DBNAME', 'vmi');
<?php function csinal() { $host = HOST; ... }
<?php $db['host'] = 'localhost'; $db['user'] = 'vki'; $db['pass'] = 'titok'; $db['name'] = 'vmi';
<?php function csinal() { global $db; $host = $db['host']; ... }