The core steps of PHP connecting Oracle database _php Tips

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.