Jump to content

Recommended Posts

[quote author=thorpe link=topic=119785.msg490888#msg490888 date=1166917304]
Uploading a zip file is no different to uploading anything else. What exactly do you want to do?
[/quote]

How to code this because  how can you use  move-upload with many files uzipped?

It isn't obvious to do exactly.
Link to comment
https://forums.phpfreaks.com/topic/31732-zip-upload/#findComment-147192
Share on other sites

[quote author=jesirose link=topic=119785.msg490975#msg490975 date=1166934826]
Uploading a zip file means there is just one file.
Are you trying to have the user upload many files, then have PHP zip it?
[/quote]

I just want to upload a zip file of images. Does uploading such a file do this, instead of using 1 image  at a time using move-upload for each one.
Link to comment
https://forums.phpfreaks.com/topic/31732-zip-upload/#findComment-147240
Share on other sites

If you upload a zip, that is ONE file. If you upload an image, that is ONE file. It does not matter how many files were in the zip, it is now ONE file. Treat it as such.

If you then want to extract the images, you'll probably need some sort of add-on.
Link to comment
https://forums.phpfreaks.com/topic/31732-zip-upload/#findComment-147246
Share on other sites

I have uncommented the line with zip_dll in extensions in php.ini for php4.4.4.
However this still fails to recoginize zip_open

problem is : zip_open() Cannot open zip archive test1.zip



$zip = zip_open("test1.zip"); //this exists in same dir

if ($zip) {
while ($zip_entry = zip_read($zip)) {
echo "Name: " . zip_entry_name($zip_entry) . "\n";
echo "Actual Filesize: " . zip_entry_filesize($zip_entry) . "\n";
echo "Compressed Size: " . zip_entry_compressedsize($zip_entry) . "\n";
echo "Compression Method: " . zip_entry_compressionmethod($zip_entry) . "\n";



}

zip_close($zip);

}
Link to comment
https://forums.phpfreaks.com/topic/31732-zip-upload/#findComment-147405
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.