Creating a GZipped tar file and dynamically streaming it via PHP?

前端 未结 2 1903
栀梦
栀梦 2021-01-18 08:04

Is there an easy interface like ZipArchive for tar.gz archives that allows me to stream the archive to the client rather than save it on the server? And if so, could someone

相关标签:
2条回答
  • 2021-01-18 08:20

    This link may be useful to you. Can you be more specific on not wanting the file to be temporarily on the filesystem?

    http://www.clker.com/blog/2008/03/27/creating-a-tar-gz-on-the-fly-using-php/

    0 讨论(0)
  • 2021-01-18 08:30

    You can direct the tar command with passthru() or exec() to send the tar.gz file to stdout. E.g.

    tar cfz - name1 name2 ...
    
    0 讨论(0)
提交回复
热议问题