No connection with DB.php
| From: | Hendrik Van Steendam | Date: | Sat, 24 Nov 2007 22:56:09 +0000 |
| Subject: | No connection with DB.php | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-28219@lists.php.net to get a copy of this message | ||
Dear,
I am beginner with PEAR and I have problems finding the DB class (I read about it in the PHP5 an
mysql Bible). However, I found on the website that DB is superseded. Do I need to change something?
Here my code:
<?php
include("dbvars.php"); // sets $host, $user, $pass
require_once 'DB.php';
$dsn = "mysql://$user:$pass@$host/'user ratings'";
$db = DB::connect($dsn);
if (DB::isError($db)) {
die ($db->getMessage());
}
?>
The message:
Warning: require_once(DB.php) [function.require-once]: failed to open stream: No such file or
directory in C:\wamp\www\Php codes ch45\db_connection.php on line 3
Fatal error: require_once() [function.require]: Failed opening required 'DB.php'
(include_path='.;C:\php5\pear') in C:\wamp\www\Php codes ch45\db_connection.php on line 3
However go-pear made already the link for me in php.ini
;***** Added by go-pear
include_path=".;C:\wamp\php\pear"
;*****
Can anybody help a beginner to solve this issue?
Thanks a lot in advance!
kind regards,
Hendrik
_________________________________________________________________
Deel al je foto's met je vrienden! Maak je eigen online plek!
http://spaces.live.com