This example describes the core steps of PHP connecting to Oracle databases. Share to everyone for your reference, specific as follows:
1, modify php.ini file, open Extension=php_oci8.dll extension.
2, copy the PHP installation directory/ext/php_oci8.dll files to the System32 directory.
3. Test code:
$conn = Oci_connect ("Scott", "Tiger", $db);
if (! $conn) {
$e = Oci_error ();
Print htmlentities ($e [' message ']);
Exit;
} else {
echo "connects Oracle successfully! ";
}
More about PHP Interested readers can view the site topics: "PHP based on PDO Operation Database Skills Summary", "PHP+MONGODB Database Operation Skills Encyclopedia", "PHP object-oriented Programming Program Introduction", "PHP string (String) Usage Summary", " Introduction to PHP+MYSQL Database operations and a summary of PHP common database operations Tips
I hope this article will help you with the PHP program design.