123456789101112131415161718192021222324252627 |
- <?php
- ini_set('display_errors', 1);
- error_reporting(E_ALL);
- function StartCon(){
- $db = "(DESCRIPTION =
- (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.20.211)(PORT = 1521))
- (CONNECT_DATA =
- (SERVER = DEDICATED)
- (SERVICE_NAME = ORCLCDB.localdomain)
- ))" ;
- $usr = 'eaton';
- $pwd = 'eaton';
- $conn = oci_connect ($usr, $pwd, $db);
- if (!$conn) {
- $m = oci_error();
- echo $m['message'], "\n";
- exit;
- }
- return $conn;
- }
- function CloseCon($conn){
- oci_close($conn);
- }
-
- ?>
|