Zip Corrupt?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tyler.pomroy
Forum Newbie
Posts: 8
Joined: Mon Sep 29, 2008 1:49 pm

Zip Corrupt?

Post by tyler.pomroy »

Hey guys, Im basically adding some php and css files into a folder then zipping them with the AddFile:: syntax
But the problem is all zips are coming out as corrupt when i try to open them on windows.

Do you know wat the problem can me?

Heres a example code

Code: Select all

<?php
 
$Zip = new ZipArchive();
 
$Zip->open("Scripts/$FileName", ZipArchive::CREATE);
$Zip->addFile("Index.php","Index.php");
$Zip->addFile("Css.css","Css.css");
$Zip->addFile("Footer.php","Footer.php");
$Zip->close();
 
?>
 
nedved31
Forum Newbie
Posts: 1
Joined: Sun Sep 04, 2011 10:00 am

Re: Zip Corrupt?

Post by nedved31 »

For solving out troubles with zip archives zip recovery. Next program works under all major Windows OS, can work with big zip files, using simply interface for working out various troubles with zip files.
User avatar
ok
Forum Contributor
Posts: 393
Joined: Wed May 31, 2006 9:20 am
Location: The Holy Land

Re: Zip Corrupt?

Post by ok »

How do you download the Zip file? Through your PHP script or via some sort of file manager?
Post Reply