Help with Zip function

software development

#1

I’m trying to find a way to create a link that will zip a folder for download.

I’ve been working with this, but it doesn’t seem to work.

Any help is very much appreciated.

<?php $the_dir = '/home/.adcom/j_delong/music.anewlanguage.org/artists/name/album/'; `/usr/bin/zip $the_dir`; $the_zip = $the_dir.'.zip'; header('Content-type: application/zip'); header('Content-Disposition: attachment; filename="Album.zip'); readfile($the_zip); ?>

#2

I haven’t messed with it, but maybe this page would be helpful: http://www.php.net/zip.

If you scroll down, it lists some functions and users have contributed some sample code in the comments section.


:stuck_out_tongue: Save up to $96 at Dreamhost with ALMOST97 promo code (I get $1).
Or save $97 with THEFULL97.