mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-03 05:52:48 +08:00
改进oracle驱动
This commit is contained in:
@@ -32,7 +32,12 @@ class Oracle extends Driver
|
||||
*/
|
||||
protected function parseDsn($config)
|
||||
{
|
||||
$dsn = 'oci:dbname=' . $config['database'];
|
||||
$dsn = 'oci:dbname=';
|
||||
if (!empty($config['hostname'])) {
|
||||
// Oracle Instant Client
|
||||
$dsn .= '//' . $config['hostname'] . ($config['hostport'] ? ':' . $config['hostport'] : '') . '/';
|
||||
}
|
||||
$dsn .= $config['database'];
|
||||
if (!empty($config['charset'])) {
|
||||
$dsn .= ';charset=' . $config['charset'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user