Nieuw lid |
|
Ik wou een soort van osm game online zetten maar de DB_connect werkt niet.
Krijg deze error:
Fatal error: main(): Failed opening required 'DB.php' (include_path='.:/data/apache/php/mmp_lib') in /data/members/free/tripod/nl/m/i/k/mikob/htdocs/db_connect.php on line 7
Mijn DB
<?php
//require the PEAR::DB classes.
require_once 'DB.php';
$db_engine = 'mysql';
$db_user = 'mikob';
$db_pass = '';
$db_host = 'localhost';
$db_name = 'mikob_nl_db';
$datasource = $db_engine.'://'.
$db_user.':'.
$db_pass.'@'.
$db_host.'/'.
$db_name;
$db_object = DB::connect($datasource, TRUE);
/* assign database object in $db_object,
if the connection fails $db_object will contain
the error message. */
// If $db_object contains an error:
// error and exit.
if(DB::isError($db_object)) {
die($db_object->getMessage());
}
$db_object->setFetchMode(DB_FETCHMODE_ASSOC);
// we write this later on, ignore for now.
include('check_login.php');
?>
<?php //require the PEAR::DB classes. require_once 'DB.php'; $db_engine = 'mysql'; $db_user = 'mikob'; $db_pass = ''; $db_host = 'localhost'; $db_name = 'mikob_nl_db'; $datasource = $db_engine.'://'. $db_user.':'. $db_pass.'@'. $db_host.'/'. $db_name; $db_object = DB::connect($datasource, TRUE); /* assign database object in $db_object, if the connection fails $db_object will contain the error message. */ // If $db_object contains an error: // error and exit. if(DB::isError($db_object)) { die($db_object->getMessage()); } $db_object->setFetchMode(DB_FETCHMODE_ASSOC); // we write this later on, ignore for now. include('check_login.php'); ?>
|