예제 #1
0
    $cfg['db']['user'] = '';
    $cfg['db']['pass'] = '';
    $cfg['db']['port'] = '3369';
} else {
    $cfg['site']['url'] = 'http://' . $_SERVER['HTTP_HOST'] . '';
    $cfg['site']['path'] = $_SERVER['DOCUMENT_ROOT'] . '';
    $cfg['media']['url'] = $cfg['site']['url'] . '/media';
    $cfg['media']['path'] = $cfg['site']['path'] . '/media';
    $cfg['db']['host'] = 'localhost';
    $cfg['db']['type'] = 'mysql';
    $cfg['db']['name'] = 'cookingtool';
    $cfg['db']['user'] = '******';
    $cfg['db']['pass'] = '******';
    $cfg['db']['port'] = '3369';
}
/**
 * @global array $tbl used for save table name values
 */
$tbl['users'] = 'users';
/**
 * include functions & classes
 */
include '../lib/_db.inc.php';
// include('../lib/_functions.inc.php');
// include('../lib/_images.inc.php');
// include('../lib/_pg.inc.php');
/**
 * instantiate data abstraction layer class
 */
$db = dbClass::open($cfg['db']['type'], $cfg['db']['name'], $cfg['db']['user'], $cfg['db']['pass'], $cfg['db']['host']);