By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,747 Members | 1,352 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,747 IT Pros & Developers. It's quick & easy.

Compress a directory

P: 30
Which is the easiest way to compress a whole directory in PHP? Keeping the directory structure, of course.

Thanks!
Aug 2 '07 #1
Share this Question
Share on Google+
4 Replies


kovik
Expert 100+
P: 1,044
What do you mean? Like, creating a *.zip or *.tar.gz?
Aug 2 '07 #2

P: 30
Exactly that. I know I can do it using command line tools but I'd rather do it strictly in PHP, is that possible?
Aug 2 '07 #3

kovik
Expert 100+
P: 1,044
You could use PHP to invoke the commands...

If you can't find any classes for zipping the files on SourceForge, chances are that nobody has made one.
Aug 3 '07 #4

P: 30
Okay then, I'll look around.
Thanks!
Aug 3 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.