How to test Oracle and PHP connectivity?

Use this code as an example:

replace scott with your user name

replace tige with your password

replace orcl with SID was given in the setup email.

<?php
if ($conn=OCILogon("scott", "tiger", "orcl")) {
echo "Successfully connected to Oracle using OCI extension.n";
OCILogoff($conn);
} else {
$err = OCIError();
echo "Error in connecting to the Oracle." . $err[text];
}
?>

  • 1 Пользователи нашли это полезным
Помог ли вам данный ответ?

Связанные статьи

What are the steps to buy SSL certificate?

This is what you need to do:1. Please ensure your whois info (registrar) info is...

I am getting error when trying to send mail from php

I'm getting the following error when trying to send an email from a PHP program: Warning: mail():...

ERRMSG: Using CDONTS on Windows 2003,2008

Symptom The following error is returned when running CDONTS.NewMail on Windows 2003 (IIS...

I made some changes to my site, but when I view it still has the old pages, why is that?

It is likely that you are pulling up cache (store) version of your page. To fix this hold down...