-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconn.php
More file actions
27 lines (23 loc) · 758 Bytes
/
conn.php
File metadata and controls
27 lines (23 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
// Connects to the XE service (i.e. database) on the "localhost" machine
$conn = oci_pconnect('c##crm', 'senha**', 'localhost:1521/XE', 'UTF8');
if (!$conn) {
$e = oci_error();
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}
/*$stid = oci_parse($conn, 'SELECT * FROM vendedor');
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";
*/
?>