ThinkPHP pdo连接Oracle的配置写法,提示报错

    'DB_TYPE'            => 'pdo', // 数据库类型
'DB_USER' => 'user101', // username
'DB_PWD' => 'zb~!@#$%', // password
'DB_PREFIX' => 'TB_', // 数据库表前缀
'DB_DSN' => 'oci:dbname=127.0.0.1:1158/orcl;charset=utf8',

ThinkPHP 3.2.2 连接Oracle 的配置写法。结果提示内容:

因为眼下PDO临时不能完美支持OCI 请使用官方的OCI驱动

错误位置

FILE: D:\PC\zbphp.com\ThinkPHP\Library\Think\Db\Driver\Pdo.class.php  LINE: 61

TRACE

#0 D:\PC\zbphp.com\ThinkPHP\Library\Think\Db\Driver\Pdo.class.php(61): E('\xE7\x94\xB1\xE4\xBA\x8E\xE7\x9B\xAE\xE5\x89\x8DPDO...')

#1 D:\PC\zbphp.com\ThinkPHP\Library\Think\Db.class.php(166): Think\Db\Driver\Pdo->connect()

#2 D:\PC\zbphp.com\ThinkPHP\Library\Think\Db\Driver\Pdo.class.php(244): Think\Db->initConnect(true)

#3 D:\PC\zbphp.com\ThinkPHP\Library\Think\Model.class.php(130): Think\Db\Driver\Pdo->getFields('tb_base_game')

#4 D:\PC\zbphp.com\ThinkPHP\Library\Think\Model.class.php(118): Think\Model->flush()

#5 D:\PC\zbphp.com\ThinkPHP\Library\Think\Model.class.php(1298): Think\Model->_checkTableInfo()

#6 D:\PC\zbphp.com\ThinkPHP\Library\Think\Model.class.php(95): Think\Model->db(0, '', true)

#7 D:\PC\zbphp.com\ThinkPHP\Common\functions.php(554): Think\Model->__construct('BaseGame', '', '')

#8 D:\PC\zbphp.com\Application\Home\Controller\IndexController.class.php(8): M('BaseGame')

#9 [internal function]: Home\Controller\IndexController->index()

#10 D:\PC\zbphp.com\ThinkPHP\Library\Think\App.class.php(155): ReflectionMethod->invoke(Object(Home\Controller\IndexController))

#11 D:\PC\zbphp.com\ThinkPHP\Library\Think\App.class.php(193): Think\App::exec()

#12 D:\PC\zbphp.com\ThinkPHP\Library\Think\Think.class.php(120): Think\App::run()

#13 D:\PC\zbphp.com\ThinkPHP\ThinkPHP.php(96): Think\Think::start()

#14 D:\PC\zbphp.com\index.php(24): require('D:\\PC\\zbphp.com...')

#15 {main}

( by default7#zbphp.com )

上一篇:The Practice of .NET Cross-Platforms


下一篇:Cocos2d-x3.2游戏的核心循环在Application,怎样处理FPS不稳