dmcglone Posted May 1, 2013 Share Posted May 1, 2013 Hi everyone,I thinking about writing some code to read a .zip file that contains all the images that are associated with their respective item or product so all the images can remain in the .zip file so all the user would have to do is upload their .zip file or .tar etc. to a folder and that would be all they needed to do, and I was wondering if anyone had any pro's and con's they could share with me or Is it just completely a lame idea? Link to comment https://forums.phpfreaks.com/topic/277509-reading-zip-file/ Share on other sites More sharing options...
lemmin Posted May 1, 2013 Share Posted May 1, 2013 PHP has some simple zip functions: http://us3.php.net/manual/en/function.zip-open.php If you intend to extract an image out of a zip file any time a user requests it, that is probably not the best idea. If you intend to do a one-time extraction after the zip is uploaded, there is nothing wrong with that. Link to comment https://forums.phpfreaks.com/topic/277509-reading-zip-file/#findComment-1427600 Share on other sites More sharing options...
ryanfilard Posted May 1, 2013 Share Posted May 1, 2013 Don't store images in a zip file if you intend to unzip the image each time. It will cause the server to work harder and even cause slow loading time. If you are looking to save space use the jpeg format. Link to comment https://forums.phpfreaks.com/topic/277509-reading-zip-file/#findComment-1427601 Share on other sites More sharing options...
dmcglone Posted May 1, 2013 Author Share Posted May 1, 2013 Thanks guys, I had a hunch it would add too much load on the server, but I was hoping it wouldn't be anough for concern. I guess I'll have to write a function to unzip the file once it's uploaded. Which I was hoping to avoid, because I'm just lazy... LOL Link to comment https://forums.phpfreaks.com/topic/277509-reading-zip-file/#findComment-1427604 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.