移除 冗余值

This commit is contained in:
iVampireSP.com 2023-02-13 03:07:26 +08:00
parent 65902b95bd
commit 3b50f77513
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -8,6 +8,8 @@
class Test extends Command class Test extends Command
{ {
// 测试用的
/** /**
* The name and signature of the console command. * The name and signature of the console command.
* *
@ -102,15 +104,13 @@ public function handle(): int
// 判断是否下载完毕 // 判断是否下载完毕
if ($downloaded_size >= $total_size) { if ($downloaded_size >= $total_size) {
break; break;
echo 'download complete';
} }
// download progress // download progress
echo 'downloaded: '.$downloaded_size.' of '.$total_size.' bytes'.PHP_EOL; echo 'downloaded: '.$downloaded_size.' of '.$total_size.' bytes'.PHP_EOL;
} else { } else {
echo 'server not support range download'.PHP_EOL; echo 'server not support range download'.PHP_EOL;
exit; // exit;
// stream download // stream download
$fp = fopen('download.bin', 'w'); $fp = fopen('download.bin', 'w');