Test Pear

A

Anonymous

Guest
hi all

I just installed pear in testing directory by go_pear.php.
I started testing the program but the result was returned the empty page.

Code:
<?php

require_once 'PEAR/DB.php';
$user = 'root';
$pass = 'root';
$host = 'localhost';
$db_name = 'test';

// Data Source Name
$dsn = "mysql://$user:$pass@$host/$db_name";

$db = DB::connect($dsn);

if (DB::isError($db)) {
        die ($db->getMessage());
} else {
		echo 'Connected successfully';
}

$db->disconnect();
?>

please explain me

thanks

best regards
 
Back
Top