PHP connection Oracle and simple Operation _php Tutorial

Source: Internet
Author: User
To enable your PHP support for Oracle, follow these steps: 1. Install PHP environment, find Appserv or XAMPP, one-click installation, very convenient 2. Put PHP in the ext directory of the PHP_ Oci8.dll to system32 directory 3. Modify the configuration in the php.ini file, remove the extention = php_oci8.dll, remove the preceding semicolon 4. Restart Apache two ways to establish links with Oracle database 1. $conn = Oci_connect (' username ', ' password ', "(description= (address= PROTOCOL) (=tcp) (PORT = 1521)) ( Connect_data = (sid=test))); 2. $conn = Oci_connect (' username ', ' password ', ' 192.168.1.100/test '); Sometimes the first way not, using the second, the inside of a few parameters are user name, password, Oracle service address, where test is the service name. $sql = "SELECT * from Table_exmaple" $ora _test = Oci_parse ($conn, $sql); Compile SQL statement Oci_execute ($ora _test,oci_default); Execute while ($r =oci_fetch_row ($ora _test))//Retrieve result {echo $ora _test[0];echo "
"; }

http://www.bkjia.com/PHPjc/532692.html www.bkjia.com true http://www.bkjia.com/PHPjc/532692.html techarticle to enable your PHP support for Oracle, follow these steps: 1. Install PHP environment, find a appserv or XAMPP, a key installation, very convenient 2. Copy the Php_oci8.dll from the Ext directory of PHP to system3 ...

  • 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.