使用PHP从文本文件创建ZIP文件

问题描述:

I have a text file that contains the path to multiple files in the server, 1 file per line, is there a way to read those lines and create a zip from em?

Thanks in advance.

我有一个文本文件,其中包含服务器中多个文件的路径,每行1个文件,是否有 阅读这些行并从em创建一个zip的方法? p>

提前致谢。 p> div>

PHP has functions for creating zips.

Here is a simple example: http://davidwalsh.name/create-zip-php

You'll need to read the file names, put them into a list, and use the function in the example.