1、首先开启PHP支持oralce扩展(百度)
2、$oracleConnect = oci_connect(帐号, 密码, 'IP/数据库名');
3、获取数据集
$resultRows = oci_parse($connect, $sql);
oci_execute($resultRows);
$data = [];
while (($row = oci_fetch_array($resultRows, OCI_ASSOC+OCI_RETURN_NULLS)) != false) {
$temp = [];
foreach ($row as $k => $v) {
$temp[$k] = $v;
}
$data[] = $temp;
}
return $data;
oci_close($connect);