create a zip folder by using php.

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
rajeshatbuzz
Forum Newbie
Posts: 1
Joined: Sat Sep 20, 2008 5:40 pm

create a zip folder by using php.

Post by rajeshatbuzz »

Hi,

I have more than 3000 folders with their relevant contents and I want to create zip for each individual folder with their folder name.

Can you guide me how to achieve this by using php?

Raj
http://www.bangalorespice.com
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: create a zip folder by using php.

Post by califdon »

rajeshatbuzz wrote:Hi,

I have more than 3000 folders with their relevant contents and I want to create zip for each individual folder with their folder name.

Can you guide me how to achieve this by using php?

Raj
http://www.bangalorespice.com
PHP would surely not be my language of choice to do file system maintenance. PHP is a web server preprocessor language, used to create web pages on the Internet.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: create a zip folder by using php.

Post by josh »

Code: Select all

escape( 'zip -r '.escapeShellArg($nameOfZipfile).' directory/');
or
http://us.php.net/zip
Post Reply