-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug.fix obvious bug.DaiZerong 201732120115 #25
base: master
Are you sure you want to change the base?
Conversation
@@ -13,7 +13,7 @@ | |||
|
|||
// Check connection | |||
if ($con->connect_error) { | |||
die("Database Connection failed: " . $conn->connect_error); | |||
die("Database Connection failed: " . $con->connect_error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dzr201732120115 @Teecloudy
It is interesting. Thanks, @dzr201732120115 . Definitely we should use $con
instead of $conn
.
BTW, this file is different from the file I use on our server.
1 <?php
2 session_start();
3
4
5
6 $con=mysqli_connect("localhost","account_name","account_password","lrr");
7 // Check connection
8 if (mysqli_connect_errno())
9 {
10 echo "Failed to connect to MySQL: " . mysqli_connect_error();
11 }
12 else
13 {
14 echo "Connected";
15 }
I think @Teecloudy has updated this file but I have not updated this file on the server.
Should I update Connect.php on the server, @Teecloudy ?
Hui
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes the connect.php need to be updated with the same database details used in the Script.php line 13 to line 18.
Ashly
@@ -18,6 +18,6 @@ | |||
|
|||
|
|||
<br><br><br><br><br><br><br><br><br> | |||
<div style="background-color:;width:100%di"> | |||
<div style="background-color:;width:100%"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -396,7 +396,7 @@ | |||
header("Location: Admin.php"); | |||
|
|||
} else { | |||
echo "Error: " . $sql . "<br>" . $conn->error; | |||
echo "Error: " . $sql . "<br>" . $con->error; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -641,7 +641,7 @@ function Create_dir($upPath) | |||
header("Location: Courses.php?course=".$url); | |||
|
|||
} else { | |||
echo "Error: " . $sql . "<br>" . $conn->error; | |||
echo "Error: " . $sql . "<br>" . $con->error; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改: conn->con width:100%di ->width:100%
仍然有两处bug不知道怎么改
Header.php Line135,139
Course.php Line312