DB Connection
| From: | Martin Kubitza | Date: | Mon, 04 Nov 2002 13:13:17 +0000 |
| Subject: | DB Connection | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-10471@lists.php.net to get a copy of this message | ||
Hi,
i try to connect to an Oracle Database and the connection works,
but i does not show any echos after that connection.
Thanks in advanced
Martin @
ISO Software System
www.isogmbh.com
<?php
echo("Try to connect to DB...");
include_once 'DB.php';
$db_dbType = "oci8";
$db_host = 'WINPC238';
$db_user = 'projektdb_test';
$db_pass = 'projektdb_test';
$db_dbname = 'projekt_test;
$dsn = $db_dbType . "://" // Build a DSN string (Data Source Name)
. $db_user . ":" // Required by DB::connect()
. $db_pass . "@"
. $db_host . "/"
. $db_dbname;
echo("<br><br>" . $dsn);
$db = DB::connect($dsn);
if (DB::isError($db))
{
die( $db->getMessage() );
}
$db->disconnect(); // Close the connection.
echo("<br>\ndone...");
?>