私はこのようなコードがあります:上記のコードに基づいてPHPダウンロードボタンを使用してtar.gzファイルをダウンロードする方法は?
header("Pragma: public", true);
header("Expires: 0"); // set expiration time
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header('Content-type: application/rar');
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header('Content-Type: application/download');
header('Content-Disposition: attachment; filename='.$fullname);
header("Content-Transfer-Encoding: binary");
header("Content-Length: " . filesize($fullname));
$fp = fopen($fullname, "r");
fpassthru($fp);
fclose($fp);
を、ダウンロードが実行されているが、tar.gz形式を開くことができません。 どのようにそれを解決するには? tar.gzをダウンロードすることは可能ですか?
試みを設定して、ダウンロードしたテキストファイルを見て、コードの下に使用する必要があり、私は先生を試みるが、失敗し、それに –
を追加しました、任意の提案を再度 – yosafat
ので、テキストが破損してダウンロード?改変されていない? –