compressing entire directory and contents with gzip

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
toms100
Forum Contributor
Posts: 119
Joined: Wed Feb 26, 2003 10:29 am
Location: Bristol,UK

compressing entire directory and contents with gzip

Post by toms100 »

im trying to use php to create a gzip file which contains all the files in a directory and the directorys in that directory (like zipping up a directory).
then this will be remotely transfered and ungziped using php again.
but i am unsure as to how i zip up more than one file :s

any help is much appreciated!
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

you can gzip only one file at once. tar them first (it would produce one file), then gzip it.
Post Reply