Possible duplicate:
mysql_fetch_array () expects parameter 1 to be a resource, boolean is set to select
I have a small php, application, or something else that opens a zip code and reads the contents. But it only works for some time ... sometimes, when I download .zip and try to view the contents, it works and echos returns me every file, but sometimes (yes, I have many .zip files), it returns these errors:
Warning: zip_read() expects parameter 1 to be resource, integer given in /home/blah/public_html/templates.php on line 23
Warning: zip_close() expects parameter 1 to be resource, integer given in /home/blah/public_html/templates.php on line 31
Here is my code:
$open = zip_open($file);
while($zip = zip_read($open)) {
$file = zip_entry_name($zip);
echo $file.'<br />';
}
zip_close($open);
David source
share