Download header cause zip file to be corrupt

Discussion in 'Windows, Linux & Others on the Mac' started by enginbayar, Jul 27, 2015.

  1. enginbayar macrumors newbie

    Joined:
    Jul 27, 2015
    #1
    We are making a download manager application ...


    Download header cause zip file to be corrupt


    Please see the code below


    header("Content-type: $mimeType");

    header("Content-Transfer-Encoding: Binary");

    header("Content-length: ".$size);

    header("Content-disposition: attachment; filename=\"".$a['name']."\"");

    readfile("$pathside");
     
  2. raidenwade macrumors newbie

    Joined:
    Jul 28, 2015
    #2
    If you still can't restore .zip file, then make use guide below or http://www.zip.openfiletool.com/ ZIP Open File Tool


    Given step by step method to repair ZIP files using inbuilt utility available in a WinRAR application:

    • Start WinRAR application.

    • Go to file menu and click open.

    • Through the find archive window, select the corrupted ZIP file available in your local machine.

    • Click to open.

    • Initialize repair by pressing ALT + R. A message saying, Repairingfile_name.zip will appear.

    • Once the repair is done, it will ask you to save the repaired ZIP file. Browse a specific location for saving the selected file.

    • Enable Treat the corrupt archive as ZIP box and click OK and click close.
     

Share This Page