Jump to content

MYSQL Fatality


jrapin

Recommended Posts

When I use this PHP code to link to my database, it tells me:
Fatal error: Failed opening required 'DB.php' (include_path='/php\pear') in /home/webadmin/kewadin.com/html/calendar/cal_inc.php on line 4

<?php
function connect() {
ini_set("include_path", "C:\php\pear");
require_once("DB.php");
$type = "mysql";
$username = "caladmin";
$password = "caladmin";
$host = "localhost";
$database = "event_calendar";
$dsn = $type . "://" . $username . ":" . $password . "@" . $host . "/" . $database;
$dbconn = DB::connect($dsn);
errortrap($dbconn);
$dbconn->setFetchMode(DB_FETCHMODE_ASSOC);
return $dbconn;
}//end connect

* I completed a search on our database for the "DB.php" file and it gave me this error message:
#1064 - You have an error in your SQL syntax near 'DB.php' at line 1.
How do I replace the incorrect programming information with the corect coding?
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.