[英]Create a ZIP file from a text file using PHP
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? 我有一个文本文件,其中包含服务器中多个文件的路径,每行1个文件,有没有办法读取这些行并从em创建一个zip?
Thanks in advance. 提前致谢。
PHP has functions for creating zips. PHP具有创建zip的功能。
Here is a simple example: http://davidwalsh.name/create-zip-php 这是一个简单的例子: 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. 您需要读取文件名,将它们放入列表中,然后使用示例中的函数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.