$fields = get_class_vars('DATABASE_CONFIG') print_r($fields['default']);
$fields = get_class_vars('DATABASE_CONFIG') print_r(
$fields['
default']);
default
App::Import('ConnectionManager'); $ds = ConnectionManager::getDataSource('default'); $dsc = $ds->config; print_r($dsc);
App::Import('ConnectionManager'); $ds = ConnectionManager::getDataSource('default'); $dsc = $ds->config; print_r(
$dsc);
Will output like this:
Array ( [persistent] => [host] => localhost [login] => root [password] => [database] => db_name [port] => 3306 [driver] => mysql [prefix] => )
No comments:
Post a Comment