add Redis for cache and Mysqli for database query

This commit is contained in:
xiaomlove
2020-12-26 20:09:15 +08:00
parent a3ba82be64
commit c961f32bb3
9 changed files with 582 additions and 16 deletions
+12 -2
View File
@@ -3,7 +3,6 @@
if(!defined('IN_TRACKER'))
die('Hacking attempt!');
include_once($rootpath . 'include/globalfunctions.php');
include_once($rootpath . 'include/config.php');
include_once($rootpath . 'classes/class_advertisement.php');
require_once($rootpath . get_langfile_path("functions.php"));
@@ -1690,8 +1689,9 @@ function dbconn($autoclean = false)
global $lang_functions;
global $mysql_host, $mysql_user, $mysql_pass, $mysql_db;
global $useCronTriggerCleanUp;
global $BASIC;
if (!mysql_connect($mysql_host, $mysql_user, $mysql_pass))
if (!mysql_connect($mysql_host, $mysql_user, $mysql_pass, $BASIC['mysql_db'], $BASIC['mysql_port']))
{
switch (mysql_errno())
{
@@ -4322,4 +4322,14 @@ function return_category_image($categoryid, $link="")
}
return $catimg;
}
function dd($vars)
{
echo '<pre>';
array_map(function ($var) {
var_dump($var);
}, func_get_args());
echo '</pre>';
exit(0);
}
?>