ファイルを提供するPHPファイルがありますが、問題は、使用しているブラウザーに関係なく、2つの別々のファイルに移動する2つのリンクをクリックすると、最初のダウンロードが完了するまで2番目のダウンロードが開始されないことです。 !!何か案は?
コードをダウンロード
header('Content-Type: application/octet-stream');
header('Content-Description: File Transfer');
header('Content-Disposition: attachment; filename="'.basename($filename).'"');
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($fullpath));
readfile($fullpath);
リンクの例
- リンク1:download.php?downloadfile = 1
- リンク2:download.php?downloadfile = 2