• 05-03-2009, 03:10:59
    #10
    <?
    
    $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');
    } 
    ?>
  • 05-03-2009, 09:47:10
    #11
    Üyeliği durduruldu
    htaccess 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');
    ?>