標籤:thinkphp oracle pdo 配置
'DB_TYPE' => 'pdo', // 資料庫類型 'DB_USER' => 'user101', // 使用者名稱 'DB_PWD' => '[email protected]#$%', // 密碼 '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 )