install import data

This commit is contained in:
xiaomlove
2021-01-28 18:00:54 +08:00
parent c4ecaa0793
commit 96e9eb42db
5 changed files with 52 additions and 19 deletions

View File

@@ -62,11 +62,6 @@ if (file_exists('config/allconfig.php')) {
*/
//load settings from database
if (IS_ANNOUNCE) {
dbconn_announce();
} else {
dbconn();
}
$settings = get_setting();
foreach ($settings as $name => $value) {
$GLOBALS[strtoupper($name)] = $value;

View File

@@ -152,7 +152,7 @@ function do_log($log, $level = 'info')
if (!empty($TWEAK['logging'])) {
$logging = $TWEAK['logging'];
}
if (!empty($TWEAK['logging'])) {
if (($fd = fopen($logging, 'a')) !== false) {
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
$content = sprintf(
"[%s] [%s] [%s] %s:%s %s%s%s %s%s",
@@ -167,7 +167,8 @@ function do_log($log, $level = 'info')
$log,
PHP_EOL
);
file_put_contents($logging, $content, FILE_APPEND);
fwrite($fd, $content);
fclose($fd);
}
}