php 与 oracle11g 的连接和基本操作

<?php
  $conn = ocilogon('system','Oracle123','127.0.0.1:1521/orcl');
  if (!$conn)
  {
    $Error = oci_error();
    print htmlentities($Error['message']);
    exit;
  }
  else
  {
    echo "Connected Oracle Successd!"."<br>";
    //ocilogoff($conn);
	$sql = "select * from scott.dept";
	$ora_test = oci_parse($conn,$sql);  //编译sql语句 
	oci_execute($ora_test,OCI_DEFAULT);  //执行 
	while($r=oci_fetch_row($ora_test))  //取回结果 
	{ 
		$i=0;
		echo $ora_test[0]; 
		echo "<BR>";   
		echo $r[$i++]."  </t>  ";
		echo $r[$i++]."  </t>  ";
		echo $r[$i++]."  </t>  ";
		
		
		

	}
  }
?>

php 与 oracle11g 的连接和基本操作_Thinkphp