2013-12-19 16 views
2

我下載了XAMPP Windows 1.8.2和oracle即時客戶端12.1。如何使用xampp連接oracle數據庫?

然後,我解壓縮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。

請幫我保存問題。

+0

_Did您刪除;無論如何?_ – revo

+0

現在檢查php_info(); oci8啓用或不啓用,然後使用標準的oci8連接 –

回答

0

現在檢查php_info();該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); 

試試這個