本文介绍了我如何调试系统中的错误.我失败了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Fatal error: Class ''mysql'' not found in C:\xampp\htdocs\LeaveManager\connection.php on line 36
我尝试过的事情:
What I have tried:
<?php
/**
* APPLICATION NAME: Leave Manager
* GROUP: Group One
* This is the main connector to the database. Without it, there won''t be any
* connection and some things will stop working/rendering
*/
/*
* The name of the database that holds all our tabular data.
*/
define(''DB_NAME'', ''leave_manager'');
/*
* The username of the databse. Needed in addition to password for connection
*/
define("DB_USER", "groupone");
/*
* Database password. Needed for connection to database(if set)
*/
define("DB_PASS", "12345678");
/*
* Database host. This is localhost since we''re developing locally
*/
define("DB_HOST", "localhost");
/*
* The main connection to the database is actually here.
*/
/*
* @var $db_con will hold details to our connection
*/
$db_con = new mysql(DB_HOST, DB_USER, DB_PASS, DB_NAME);
/*
* Character set to use for our connection. We''ll choose utf-8 since it covers
* more characters than ASCII.
*/
$db_con->set_charset("utf8");
?>
推荐答案
这篇关于我如何调试系统中的错误.我失败了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!