Can I download multiple zip files from server into one zip file?

后端 未结 2 1518
死守一世寂寞
死守一世寂寞 2021-01-26 12:54

I want to download multiple zip files from a server, and while downloading this all zip file append and download as a one zip file from server.

相关标签:
2条回答
  • 2021-01-26 13:32

    To pack all zip files in the e.g. current directory and send that to the browser, try:

     header("Content-Type: archive/zip");
     passthru("zip - -0 *.zip");
    
    0 讨论(0)
  • 2021-01-26 13:34

    I use PLCZIP for zip operations and recommend it to you too

    craete new pclzip object

     require_once('pclzip.lib.php');
     $archive = new PclZip('archive.zip');
     $v_list = $archive->add('myfile1.zip,myfile2.zip,myfile3.zip');
    

    http://www.phpconcept.net/pclzip

    http://www.phpconcept.net/pclzip/user-guide/57

    0 讨论(0)
提交回复
热议问题