    {
        $handle = opendir($filePath);
        while (($filename = readdir($handle)) !== false)
        {
            if ($filename != "." && $filename != "..")
            {
                $zip->addFile($filePath .DIRECTORY_SEPARATOR.$filename, $filename);
            }
        }
        @closedir($handle);
    }