From 91d118d56764c5b47325526633d2ccc356d322e5 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Sun, 13 Sep 2020 13:04:58 +0800 Subject: [PATCH] slash in needupdate() --- common.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common.php b/common.php index d9d127b..2e284f7 100644 --- a/common.php +++ b/common.php @@ -925,7 +925,9 @@ function message($message, $title = 'Message', $statusCode = 200)

' . $title . '

+ ' . $message . ' +

@@ -934,7 +936,9 @@ function message($message, $title = 'Message', $statusCode = 200) function needUpdate() { - $current_version = file_get_contents(__DIR__ . '/version'); + $slash = '/'; + if (strpos(__DIR__, ':')) $slash = '\\'; + $current_version = file_get_contents(__DIR__ . $slash . 'version'); $current_ver = substr($current_version, strpos($current_version, '.')+1); $current_ver = explode(urldecode('%0A'),$current_ver)[0]; $current_ver = explode(urldecode('%0D'),$current_ver)[0];