Check this: http://bugs.php.net/bug.php?id=40873 . Maybe you are affecting by the same too. You can use* **archive_tar* package for your purpose. Nicest class to work with zip/tar files on php: http://pear.php.net/package/Archive_Tar Just install pear on your system, put the class file at the corresponding archive_tar folder & you're ready to go. Check their docs<http://pear.php.net/package/Archive_Tar/docs/latest/Archive_Tar/Archive_Tar.html> . On Tue, Jan 26, 2010 at 5:40 PM, bahalul kabir <bahar_aub@xxxxxxxxx> wrote: > > > Hi, > I am using windows vista and if I am going to unzipp a file that zipped > throug php code, it says file corrupt! > But if the file is too small like 1 or 2 lines it open ,if more than 2 > lines it does not open. > Don't understand why?? anyone can help or share any idea. > > Trying to unzip in windows vista. > > > $zip = new ZipArchive; > if ($zip->open('test.zip' ,ZipArchive: :CREATE) === TRUE) { > $zip->addFile('/path/ to/index. txt', 'newname.txt' ); > $zip->close(); > echo 'ok'; > } else { > echo 'failed'; > } > > kabir > > [Non-text portions of this message have been removed] > > > [Non-text portions of this message have been removed]