archive_tar - can not open with winzip

After creating a zip-file with archive_tar, i can open the file with winrar but not with winzip. The file is create on a linux server with following function:

function zipme($folder,$tarname,$files){
      require("tar.php");
      $tar = new Archive_Tar($tarname,"zip");
      if(!$tar->createModify($files,"","$folder"))return false;
      return true;
}

here are the parameters:
$folder = "xmlfolder/client/"
$tarname = "client_data.zip"
$files = array("xmlfolder/client/customer.xml","xmlfolder/client/products.xml")

what is going wrong? I can download the file but it is invalid when i open it with winzip.
secuteamersAsked:
Who is Participating?
 
hernst42Connect With a Mentor Commented:
Can you open the zip correctly if you rename it localy from .zip to .tar?
Which tar.php doe you use own programmed or the one from PEAR?
0
 
secuteamersAuthor Commented:
How can i make it a zip-file with extension 'zip'?
0
 
hernst42Commented:
There are various php-programs to do this. See
http://de3.php.net/zip
http://pear.php.net/package/File_Archive
0
 
secuteamersAuthor Commented:
thx,
works fine
0
All Courses

From novice to tech pro — start learning today.