Forum Moderators: coopster
Warning: zip_read() expects parameter 1 to be resource
$file = 'path/to/file.php';
zip_read($file);
<?php
$zip = zip_open("test.zip");
if ($zip)
{
while ($zip_entry = zip_read($zip))
{
echo "<p>";
echo "Name: " . zip_entry_name($zip_entry) . "<br />";
if (zip_entry_open($zip, $zip_entry))
{
echo "File Contents:<br/>";
$contents = zip_entry_read($zip_entry);
echo "$contents<br />";
zip_entry_close($zip_entry);
}
echo "</p>";
}
zip_close($zip);
}
?>
You would be better using a complete file path as noted in the manual, not the relative one that I have used as an example.
You may want to post some of the code that you are using. As it is difficult to provide you with help when we dont know what the problem is...