diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..71c62bf --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ + +o/* diff --git a/index.php b/index.php index 8455a92..7109126 100644 --- a/index.php +++ b/index.php @@ -23,7 +23,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['file'])) { $file_tmp = $_FILES['file']['tmp_name']; $error = $_FILES['file']['error']; - // 获取当前年月 + // 获取当前年月,为防止报错,先设置时区 + date_default_timezone_set('Asia/Shanghai'); $year_month = date('Y/m'); $upload_dir = $base_upload_dir . $year_month; @@ -223,7 +224,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['file'])) {
@@ -238,7 +239,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['file'])) { -