Added check for db file as well as config file. cleaned up process

This commit is contained in:
color.diff=auto
2021-03-26 08:45:33 -06:00
parent b28a59c313
commit ac7682b62c
3 changed files with 5 additions and 15 deletions

View File

@@ -2,12 +2,6 @@
include "includes.php";
if (file_exists("d2im.conf")) {
if (is_dir($config['path'])) {
define('TXT_PATH', $config['path']);
}
}
$files = new D2Files();
$parser = new D2TxtParser();
@@ -20,7 +14,9 @@ foreach ($data as $k => $v) {
$db->createTables($k, $v);
$db->fillsTables($k, $v);
}
// put in html redirect as backup, because
// for some odd reason windows gives
// an error on header() but linux does not.
?>
<!doctype html>
<html lang="en">