backup support zip

This commit is contained in:
xiaomlove
2022-05-14 15:19:10 +08:00
parent cfc2e30d59
commit d1d672e246
30 changed files with 134 additions and 64 deletions

View File

@@ -628,6 +628,16 @@ function isRunningInConsole(): bool
return !RUNNING_IN_OCTANE && php_sapi_name() == 'cli';
}
function isRunningOnWindows(): bool
{
return !RUNNING_IN_OCTANE && strtoupper(substr(PHP_OS, 0, 3)) === 'WIN';
}
function command_exists($command): bool
{
return !(trim(exec("command -v $command")) == '');
}
function get_tracker_schema_and_host($combine = false): array|string
{
global $https_announce_urls, $announce_urls;