Conexão PHP com Oracle
Vou postar uma conexão Simples com o Oracle.
// Setando Usuario Senha Nome database $user = "seuusuario"; $pass = "suasenha"; $name = "NOMEDOSEUDATABASE"; $host = "IPSERVIDOR/DATABASE"; //try verificar se erro try { //Setando Conexão $conn = oci_connect($user,$pass,$host); //Query $stid = oci_parse($conn, 'SELECT * from uma_tabela'); //executando query oci_execute($stid); while ($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS)) { foreach ($row as $item) { echo ($item !== null ? htmlentities($item, ENT_QUOTES) : " "); } } }catch(PDOException $e) { //se tiver erro aparece a mensagem echo ($e->getMessage()); }
God Bless