将目录下文件打包,该怎么解决

WBOY
Release: 2016-06-13 13:42:33
Original
1064 people have browsed it

将目录下文件打包
我一个目录下存在以下文件:
2007051501   2007051502   2007051601   2007051602

要求将文件包含20070515的两个文件打包成20070515.tar.gz
同理,将包含20070516的两个文件打包成20070516.tar.gz

------解决方案--------------------
$command= "tar -cvf 20060515.tar.gz 20060515.* ";
exec($command);

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!