load(); $title = $conf->getSetting( 'site', 'title' ); print "Title is $title\n"; $settings = $conf->getSettings( 'db', array( 'host', 'user', 'password' ) ); print "Connecting to database at '{$settings['host']}' with user '{$settings['user']}' and password '{$settings['password']}'\n"; if ( $conf->hasSetting( 'db', 'socket' ) ) print 'Socket: ' . $conf->getSetting( 'db', 'socket' ) . "\n"; } catch ( Exception $e ) { print "Caught exception while reading INI file\n"; print $e->getMessage() . "(" . $e->getCode() . ")\n"; print $e->getTraceAsString() . "\n"; } ?>