<?
$local_file = 'dosyalar/klasorler/zip/bakkal.zip';
$download_file = 'ahmet.zip';
if(file_exists($local_file) && is_file($local_file)) {
header('Cache-control: private');
header('Content-Length: '.filesize($local_file));
header('Content-Disposition: filename='.$download_file);
flush();
$file = fopen($local_file, "r");
while(!feof($file)) {
flush();
sleep(1);
}
fclose($file);}
else {
die('Böyle Bir Dosya Yok');
}
?> Php Linki Gizleme
10
●1.687
- 05-03-2009, 03:10:59
- 05-03-2009, 09:47:10Üyeliği durdurulduhtaccess ile zip dosyalarini php ye yönlendirebilirsin.
sonrada dosyanın içeriğini header fonksiyonu ile mime değiştirerek gönderebilirsin.
PHP: header - Manual
<?php header('Content-type: application/zip'); header('Content-Disposition: attachment; filename="downloaded.zip"'); readfile('original.zip'); ?>