用户
 找回密码
 入住 CI 中国社区
搜索
12
返回列表 发新帖
楼主: 韶聪
收起左侧

[HELP] oracle链接成功后,从数据库中取出的数据中文不能显示

[复制链接]
发表于 2012-10-23 10:48:22 | 显示全部楼层
wangmingjun 发表于 2012-10-23 09:23
你的oracle数据库连接成功了么?

成功了
发表于 2012-10-23 10:54:21 | 显示全部楼层
kissgxd 发表于 2012-10-23 10:48
成功了

我现在也在用CI连Orcale,能告诉我怎么配置的吗?
发表于 2012-10-27 14:15:52 | 显示全部楼层
wangmingjun 发表于 2012-10-23 10:54
我现在也在用CI连Orcale,能告诉我怎么配置的吗?

$db['oracle']['hostname'] = '192.168.0.10/oracmsdb';
$db['oracle']['username'] = 'oracle_username';
$db['oracle']['password'] = 'password';
$db['oracle']['database'] = '';
$db['oracle']['dbdriver'] = 'oci8';
$db['oracle']['dbprefix'] = '';
$db['oracle']['pconnect'] = TRUE;
$db['oracle']['db_debug'] = TRUE;
$db['oracle']['cache_on'] = FALSE;
$db['oracle']['cachedir'] = '';
$db['oracle']['char_set'] = 'zhs16gbk';
$db['oracle']['dbcollat'] = 'utf8_general_ci';
$db['oracle']['swap_pre'] = '';
$db['oracle']['autoinit'] = TRUE;
$db['oracle']['stricton'] = FALSE;
发表于 2013-1-17 11:57:10 | 显示全部楼层
kissgxd 发表于 2012-10-27 14:15
$db['oracle']['hostname'] = '192.168.0.10/oracmsdb';
$db['oracle']['username'] = 'oracle_username' ...

为什么我这样配置无效,提示:

A PHP Error was encountered
Severity: Notice
Message: Use of undefined constant OCI_COMMIT_ON_SUCCESS - assumed 'OCI_COMMIT_ON_SUCCESS'
Filename: database/DB.php
Line Number: 144
发表于 2013-3-14 15:52:39 | 显示全部楼层
你需要安装oracle的驱动。

本版积分规则