header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false);
header("Content-type: application/force-download");
header("Content-Disposition: attachment; filename=\"". $file ."\";");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($file));
file_get_contents($file);
readfile($file);
exit();
Ben ne yapıyorum yanlış bir fikrin? Bu kullanıcının sabitdisk benim sunucuda herhangi bir dosya indirmek gerekir? şekilde her dosya zarar görmüş! üstelik ben indirilen dosyanın adını değiştirebilirsiniz nasıl acaba?
$file always contains the full path to my file. if i try header('Location:' . $file ); the browser successfully opens my file. however if the file is a .jpg the browser doesn't prompt the download window. instead it just opens the file in the browserwindow. i want every file to be downloaded to the hd.
bana adamlar yardım lütfen. Ben şimdi bir hafta boyunca sonra bu kulüpler ve ben bir çözüm bulamıyorum?