RE: [PHP] zipfile problems - SOLVED
| From: | ThomasTech) | Date: | Fri, 08 Apr 2005 13:39:48 +0000 |
| Subject: | RE: [PHP] zipfile problems - SOLVED | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-212639@lists.php.net to get a copy of this message | ||
> -----Original Message-----
<snip>
> 08 while (false !== ($file = readdir($handle))){
> 09 $fn = explode(".",$file);
> 10 if ($fn[1]=="pdf"){
> 11 echo $inputpath.$file."<br>";
> 12 $handle = fopen($inputpath.$file,"r");
> 13 $filedata = fread($handle,
> filesize($inputpath.$file));
> 14 $zipfile -> add_file($filedata, "dir/".$file);
> 15 }
> 16 }
</snip>
Do you need to also close the files you have opened?