當我第二次啓動應用程序嘗試進行新下載時,它就是之前下載的內容數據!這裏是代碼:如何刪除下載緩存?
$output = RP_MAIN . 'docbook/data/myfile.pdf';
header('Content-Type: application/x-download');
header('Content-Disposition: attachment; filename="'.'manuel.pdf'.'"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
ob_clean();
readfile($output);
那麼如何在下載之前清除下載緩存?
它不起作用:下載大小爲空白! – pheromix
每次我想下載時,我應該更改'版本'參數的值嗎? – pheromix
try header('Content-Disposition:attachment; filename =''。'manuel.pdf?version = 1.5'。'''); –