Excuse me, how can I connect to the oracle database under the kohana framework? thank you! how can I use the pdo in the kohana framework to connect to the oracle database? thank you!
Use the original tns.
Reply to discussion (solution)
Done
; Extension = php_pdo_oci.dll
; Extension = php_pdo_oci8.dll
Both services must be enabled.
Sample code for connecting to Pdo_oci in the Kohana framework:
'Test' => array
(
'Type' => 'pdo ',
'Connection' => array (
/**
* The following options are available for MySQL:
*
* String hostname server hostname, or socket
* String database name
* String username database username
* String password database password
* Boolean persistent use persistent connections?
* Array variables system variables as "key => value" pairs
*
* Ports and sockets may be appended to the hostname.
*/
'Dsn '=> 'Oss: dbname = // xxx. xx ',
'Hostname' => 'hostname ',
'Database' => 'Database name ',
'Username' => 'username ',
'Password' => 'password ',
'Persistent' => FALSE,
),
'Table _ prefix' => '',
'Charset' => 'gb2312 ',
'Caching' => FALSE,
'Filing' => TRUE,
)