Oracle
 sql >> Database >  >> RDS >> Oracle

Come collegare un database Oracle da PHP

Il quarto link in google dopo aver cercato le tue domande esatte ha portato il seguente link:http://me2learn.wordpress.com/2008/10/18/connect-php-with-oracle-database/

<?php
    $db = "(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.34)(PORT = 1521)))(CONNECT_DATA=(SID=orcl)))" ;

    if($c = OCILogon("system", "your database password", $db))
    {
        echo "Successfully connected to Oracle.\n";
        OCILogoff($c);
    }
    else
    {
        $err = OCIError();
        echo "Connection failed." . $err[text];
    }
?>