Warning: mysqli_close() expects parameter 1 to be mysqli,
object given in /home/mjcrawle/public_html/toga/homefile/processlogin.php on line 63
I am trying to connect a database and I am getting the above error. I I am using 4 different includes in this fil开发者_StackOverflow中文版e and the include are before I try to connect to the database.
Sample of one of my includes
require_once('../homefile/class/database.class.php');
The include work fine and this is my line of code to connect my db.
/*New database Object*/
$db = new Database;
I am kind at a loss... The database is closed.
mysqli_close($db);
There is a ton of code but I am not sure anyone would want to wade though it. If you can thing of anything let me know.
Firstly, mysqli_close expects the arugment to be a handle opened with mysql_open, but instead you've passed it a Database object.
Secondly, we don't know what that class contains, but I would expect that it has a method like ->close() that closes the database connection.
Ie,
$db->close();
加载中,请稍侯......
精彩评论