上传日志

This commit is contained in:
icret
2021-11-14 23:25:21 +08:00
parent 6169e582a7
commit 7b519752d0
9 changed files with 166 additions and 21 deletions

View File

@@ -16,9 +16,9 @@ class getVerson
public function readJson()
{
if (file_exists(__DIR__ . '/../i/cache/verson.json')) {
$file = fopen(__DIR__ . '/../i/cache/verson.json', 'r');
$test = fread($file, filesize(__DIR__ . '/../i/cache/verson.json'));
if (file_exists(__DIR__ . '/../admin/logs/verson/verson.json')) {
$file = fopen(__DIR__ . '/../admin/logs/verson/verson.json', 'r');
$test = fread($file, filesize(__DIR__ . '/../admin/logs/verson/verson.json'));
$verson = json_decode($test, true);
return $verson['tag_name'];
fclose($file);
@@ -32,7 +32,7 @@ class getVerson
$verson = $this->geturl($this->url);
$verson = json_decode($verson, true);
$file = fopen(__DIR__ . '/../i/cache/verson.json', 'w+');
$file = fopen(__DIR__ . '/../admin/logs/verson/verson.json', 'w+');
fwrite($file, $verson);
fclose($file);
}