Fix all PHP 8 deprecated/removed function usage across the repository
Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/209fe796-9a38-47c1-a6b7-992ce11d038b Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
parent
73319ffeed
commit
c0bd0a0bb5
30 changed files with 198 additions and 471 deletions
|
|
@ -28,18 +28,12 @@ function connect2db() {
|
|||
// -------------------------------------------------------------------------
|
||||
global $net2ftp_settings;
|
||||
|
||||
$mydb = mysql_connect($net2ftp_settings["dbserver"], $net2ftp_settings["dbusername"], $net2ftp_settings["dbpassword"]);
|
||||
$mydb = mysqli_connect($net2ftp_settings["dbserver"], $net2ftp_settings["dbusername"], $net2ftp_settings["dbpassword"], $net2ftp_settings["dbname"]);
|
||||
if ($mydb == false) {
|
||||
setErrorVars(false, __("Unable to connect to the MySQL database. Please check your MySQL database settings in net2ftp's configuration file settings.inc.php."), debug_backtrace(), __FILE__, __LINE__);
|
||||
return false;
|
||||
}
|
||||
|
||||
$result2 = mysql_select_db($net2ftp_settings["dbname"]);
|
||||
if ($result2 == false) {
|
||||
setErrorVars(false, __("Unable to select the MySQL database. Please check your MySQL database settings in net2ftp's configuration file settings.inc.php."), debug_backtrace(), __FILE__, __LINE__);
|
||||
return false;
|
||||
}
|
||||
|
||||
return $mydb;
|
||||
|
||||
} // End connect2db
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue