如何使用 PDO::__construct() 连接到 Oracle。
我拥有的是主机、端口、SID 和 INSTANCE_NAME。
寻找我创建的信息
CONNECT username@[//]host[:port][/service_name][:server][/instance_name]
在http://docs.oracle.com/cd/E18283_01/network.112/e10836/naming.htm#i498306,但我不知道如何将其“翻译”为 PDO。
如何使用 PDO::__construct() 连接到 Oracle。
我拥有的是主机、端口、SID 和 INSTANCE_NAME。
寻找我创建的信息
CONNECT username@[//]host[:port][/service_name][:server][/instance_name]
在http://docs.oracle.com/cd/E18283_01/network.112/e10836/naming.htm#i498306,但我不知道如何将其“翻译”为 PDO。
尝试这个:
oci:dbname=//host:port/SID/INSTANCE_NAME
并查看http://www.php.net/manual/en/ref.pdo-oci.connection.php了解更多信息。用户名是单独传递的。