<?php
include("zip.php");
$ziper = new zipfile();

$allfiles=array();
$directory=getcwd();

echo getcwd() . "\n";


if ($handle = @opendir($directory)) {
             while (false !== ($file = readdir($handle))){
                   if ($file != "." && $file != ".."){
                      $ext = str_replace('.','',strstr($file, '.'));
                      $ext=strtolower($ext);
                      $filename=basename($file,".".$ext);
                      $allfiles[]=$file;
                      echo $file."<BR>";
                   }
             }
}

closedir($handle);

$ziper->addFiles(array('aspex','beta','exhibition','gallery53'));  //array of files
$ziper->output("myzip.zip");
?>
