我如何调试系统中的错误.我失败了 [英] How I debug this errors in my system . I have failed

查看:489
本文介绍了我如何调试系统中的错误.我失败了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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");
?>

推荐答案

db_con将保存我们连接的详细信息 */
db_con will hold details to our connection */


db_con =新的mysql(DB_HOST,DB_USER,DB_PASS,DB_NAME); /* *用于我们的连接的字符集.我们将选择utf-8,因为它涵盖了 *比ASCII字符更多. */
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"); ?>
db_con->set_charset("utf8"); ?>


这篇关于我如何调试系统中的错误.我失败了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆