0
我有一個小小的下載腳本安裝在這裏,它運作良好有時。我已經將問題縮小到僅在大多數時間發送的響應標題,並且當它們不發生什麼時,它會要求我下載文件,除非它的名稱在磁盤上,並且它被下載爲「應用程序/八位字節流」。 這裏有我發送php下載不一致的行爲
header('Content-Description: File Transfer');
header('Content-Disposition: attachment; filename="'.$file->logical_name.'"');
header('Content-Type: "'.$mime.'"');
header("Content-Length: ".filesize($this->file));
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Pragma: no-cache');
readfile($this->file);
所以要清楚我的問題的頭文件信息只被有時發送,當他們沒有讓我的問題,這是沒有任何有關文件的信息被因此它發送下載作爲weired命名(如磁盤)「應用程序/八位字節流」
UPDATE
這dosnt使用更小文件讀取日之前發生的圍繞小於100KB