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