public function tar($product, $name, $version) { $pkg = new Pkg(); $info = $pkg->getPackageInfo($product, $name); if (!$info) { Flight::notFound(); } $path = $info['path']; $ret = $pkg->exportPackage($product, $name, $version); // 控制 Curl 请求错误 $this->handleCurlError($pkg); Flight::redirect("/download{$path}/{$name}-{$version}-install.tar.gz"); }