Thinkphp connects to the oracle Database. I removed the comment in front of extension = php_oci8.dll in php. in, and changed the connection string in db. php.
Return array (
'Db _ type' => 'Oracle ',
'Db _ host' => '2017. 168.22.245 ',
'Db _ port' => '123 ',
'Db _ name' => 'zhs16gbk. llsoft ',
'Db _ user' => 'test ',
'Db _ pwd' => 'test ',
'Db _ prefix' => 'thinkphp _',
);
However, the connection fails.
Reply to discussion (solution)
The think error tracking tool opened.
1. Oracle clients must be installed for Oracle8 and later versions. check that the Oracle client has been installed.
2. the name of your database (ZHS16GBK. llsoft) is strange.
Generally, ZHS16GBK is a character set.
3. the database name should be the listening name of Oracle (the listening name in Oracle can be the same or different from the database name)
'Db _ type' => 'Oracle ', // Database TYPE
'Db _ host' => 'localhost', // server address
'Db _ name' => 'orcl ', // database NAME
'Db _ user' => '', // USER name
'Db _ pwd' => '', // password
'Db _ port' => '123', // PORT
'Db _ type' => 'Oracle ', // Database TYPE
'Db _ host' => 'localhost', // server address
'Db _ name' => 'orcl ', // database NAME
'Db _ user' => '', // USER name
'Db _ pwd' => '', // password
'Db _ port' => '123', // PORT
My connection is on.
'Db _ type' => 'Oracle ', // Database TYPE
'Db _ host' => 'localhost', // server address
'Db _ name' => 'orcl ', // database NAME
'Db _ user' => '', // USER name
'Db _ pwd' => '', // password
'Db _ port' => '123', // PORT
I can do that, but my project does not support oracle, but I still want to give it to you.