[英]how to connect fuelphp wih oracle?
I am new in oracle and fuelphp, simple question, how to set connection fuelphp framework with oracle DB, documentation only for mysql and postgresql : 我是oracle和fuelphp的新手,简单的问题,如何设置与Oracle DB的连接fuelphp框架,文档仅适用于mysql和postgresql:
// a MySQL driver configuration
'development' => array(
'type' => 'mysqli',
'connection' => array(
'hostname' => 'localhost',
'port' => '3306',
'database' => 'fuel_db',
'username' => 'your_username',
'password' => 'y0uR_p@ssW0rd',
'persistent' => false,
'compress' => false,
),
'identifier' => '`',
'table_prefix' => '',
'charset' => 'utf8',
'enable_cache' => true,
'profiling' => false,
'readonly' => false,
),
// a PDO driver configuration, using PostgreSQL
'production' => array(
'type' => 'pdo',
'connection' => array(
'dsn' => 'pgsql:host=localhost;dbname=fuel_db',
'username' => 'your_username',
'password' => 'y0uR_p@ssW0rd',
'persistent' => false,
'compress' => false,
),
'identifier' => '"',
'table_prefix' => '',
'charset' => 'utf8',
'enable_cache' => true,
'profiling' => false,
'readonly' => array('slave1', 'slave2', 'slave3'),
)
how to connect with oracle? 如何与oracle连接? thank you
谢谢
Working from the PostgreSQL PDO example you posted I would try this: 从您发布的PostgreSQL PDO示例工作,我将尝试这样做:
'production' => array(
'type' => 'pdo',
'connection' => array(
'dsn' => 'oci:dbname=//hostname:port/database',
'username' => 'your_username',
'password' => 'y0uR_p@ssW0rd',
'persistent' => false,
'compress' => false,
),
'identifier' => '"',
'table_prefix' => '',
'charset' => 'utf8',
'enable_cache' => true,
'profiling' => false,
'readonly' => false
)
Just be sure that you've correctly installed & configured the PHP OCI drivers. 只要确保您已正确安装和配置 PHP OCI驱动程序即可。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.