Error : PCLZIP_ERR_INVALID_PARAMETER (-3) : Invalid variable type p_filelist
<html>
<head>
<?php require_once("filesize_lib.php"); ?>
<?php require_once("pclzip.lib.php");?>
<style type="text/css">
.readme{
width:500px;
height:150px;
background: silver;
overflow-x: hidden;
overflow-y: scroll;
}
</style>
</head>
<body>
<?php
$readme = "/readme.txt";
$download = "downloads";
// Openen
$dir = new DirectoryIterator('.');
// Doorlopen
?>
<table width="960px" border="1px"><tr><td width="185px"><strong>Name</strong></td><td width="50px"><strong>Type</strong></td><td width="50px"><strong>Size</strong></td><td width="125px"><strong>Last Modified</strong></td><td><strong>Short description</strong></td><td width="50px"><strong>Download</strong></td></tr>
<?php
foreach ($dir as $file)
{
if (! $file->isDot()
&& $file != ".."
&& $file != "index.php"
&& $file != "filesize_lib.php"
&& $file != "downloads"
)
{ ?><tr><td><?php
echo '<a href="'.$file.'">'.$file.'</a>';
?></td><td><?php
echo filetype($file);
?></td><td><?php
echo fileORdirSize($file).'<br/>';
?></td><td><?php
echo date("M j, Y", filemtime($file));
?></td><?php
if (filetype($file) == "dir"){
?>
<td><div class="readme"><?php
echo file_get_contents($file.$readme);
?></div></td><?php
} else {
?><td>Files don't have descriptions, but can be tested directly from this page.</td><?php
}
?><td><?php
$zip = new PclZip("tmp/archief.zip");
if($zip->create($file) == 0)
die("Error : " . $zip->errorInfo(true));
echo '<a href="'.$zip.'">'.$zip.'</a>';
?></td></tr><?php
}
}
?>
</table>
</body>
</html>