如何连接oracle数据库与xampp?

问题描述 投票:2回答:1

我下载了XAMPP Windows 1.8.2和oracle即时客户端12.1。

然后,我解压缩oracle即时客户端文件,编辑PATH环境设置,并通过添加即时客户端路径在系统变量列表中编辑PATH

我发现string ;extension=php_oci8.dll. Remove the semicolon (;) from the begining of the string to activate the oracle extension and save it.

然后我重新启动xampp,但我找不到phpinfo中的oci8。

请帮我解决问题。

oracle xampp oci8 instantclient
1个回答
0
投票

现在检入phpinfo();如果启用,则启用或不启用oci8,然后使用标准的oci8连接

这是您的标准Oracle连接

 include('database.php'); //which have database credentials and server name stored

  $c = oci_connect($userName, $password, "(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST =$serverName)(PORT = 1521)))(CONNECT_DATA=(SID=$databaseName)))");

print_r($c);

试试这个

© www.soinside.com 2019 - 2024. All rights reserved.