0) { if (file_exists($latestPath)) { unlink($latestPath); } if (!copy($targetPath, $latestPath)) { $message = '更新最新版本失败'; } $message = '上传成功! 已更新为最新版本: ' . $versionName; } else { $message = '上传成功! 当前版本: ' . $versionName . ' (未更新,已有更高版本: ' . $currentLatestVersion . ')'; } } else { $message = '上传失败'; } } } } function getLatestVersionName($dir) { $files = glob($dir . '*.apk'); $maxVersion = '0'; foreach ($files as $file) { if (basename($file) === 'F8来客_latest.apk') continue; $version = shell_exec("aapt dump badging \"$file\" | grep versionName | awk -F\"'\" '{print $2}'"); $version = trim($version); if (version_compare($version, $maxVersion) > 0) { $maxVersion = $version; } } return $maxVersion; } ?>
暂无上传记录
'; } ?>