我在IP:10.21.30.178
上有一个数据库port:1525
,其中包含凭据user:FUNREAD
,pass:clock24
和service name:DRFUNPD1
。
我正在尝试从我的计算机(10.21.30.220
)进行连接,并在下面编写代码进行连接。
<?php
// Connects to the XE service (i.e. database) on the "localhost" machine
$conn = oci_connect('FUNREAD', 'clock24', '10.6.8.51:1525/DRFUNPD1');
if (!$conn) {
$e = oci_error();
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}
$stid = oci_parse($conn, 'SELECT * FROM employees');
oci_execute($stid);
echo "<table border='1'>\n";
while ($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS)) {
echo "<tr>\n";
foreach ($row as $item) {
echo " <td>" . ($item !== null ? htmlentities($item, ENT_QUOTES) : " ") . "</td>\n";
}
echo "</tr>\n";
}
echo "</table>\n";
?>
但是低于错误..
致命错误:在第4行的C:\ xampp \ htdocs \ bkash \ pending.php中调用未定义的函数oci_connect()