I use Easyphp5, but when I do an instance of a class in php file
triggered an error
i have instance this class in another file or php class but any error
Fatal error: Class 'db_connect' not found in C:\Program Files (x86)\EasyPHP-12.1\www\testPDA\create_client.php on line 11
here is this class
<?php
class DB_Connect {
// constructor
function __construct() {
}
// destructor
function __destruct() {
// $this->close();
}
// Connecting to database
public function connect() {
require_once 'config.php';
// connecting to mysql
$con = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
// selecting database
mysql_select_db(DB_DATABASE);
// return database handler
return $con;
}
// Closing database connection
public function close() {
mysql_close();
}
}
?>