-uncomment extension=php_oracle.dll, extension=php_oci8.dll file php.info
-download oracle instant client
-copy all content (only content) of oracle instant client to apache/bin (or you can set PATH )
-restart xampp;
-test by following code
<?php
$db_test = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=v)(PORT=1521)) (CONNECT_DATA=(SID=pw)))';
//way 1
$c = oci_connect("pw", "pw", 'v:1521/pw');
//or way 2
$c = oci_connect("pw", "pw", $db_test);
$s = oci_parse($c, 'select * from attendance ');
oci_execute($s);
while ($res = oci_fetch_array($s, OCI_ASSOC)) {
var_dump($res);
}
?>
ref http://www.apachefriends.org/f/viewtopic.php?p=143872
Người đăng:
Gen Shunei
0 nhận xét:
Đăng nhận xét