asmith Posted October 1, 2008 Share Posted October 1, 2008 Hey guys Is it possible to make an uploaded file zip? for example if the user upload file.exe, It make it zip (file.zip)then save it on the server? Link to comment https://forums.phpfreaks.com/topic/126670-making-the-uploaded-file-zip/ Share on other sites More sharing options...
The Little Guy Posted October 1, 2008 Share Posted October 1, 2008 $file = 'file.exe'; exec("zip file.zip $file"); header("Location: file.zip"); exit; http://lowfatlinux.com/linux-zip-unzip.html Link to comment https://forums.phpfreaks.com/topic/126670-making-the-uploaded-file-zip/#findComment-655173 Share on other sites More sharing options...
asmith Posted October 2, 2008 Author Share Posted October 2, 2008 Thanks for the reply. Is there any options for this? like Can i Compress the file much more to make it as small as possible? Link to comment https://forums.phpfreaks.com/topic/126670-making-the-uploaded-file-zip/#findComment-655446 Share on other sites More sharing options...
RedMist Posted October 2, 2008 Share Posted October 2, 2008 Thanks for the reply. Is there any options for this? like Can i Compress the file much more to make it as small as possible? I'm not tried this, but I think... $file = 'file.exe'; exec("zip -9 file.zip $file"); header("Location: file.zip"); exit; Should make it as small as possible, but it's also slower. Link to comment https://forums.phpfreaks.com/topic/126670-making-the-uploaded-file-zip/#findComment-655450 Share on other sites More sharing options...
redarrow Posted October 2, 2008 Share Posted October 2, 2008 THE LITTLE GUY... what program under windows would you use for zipping and unzipping files thank you........ Link to comment https://forums.phpfreaks.com/topic/126670-making-the-uploaded-file-zip/#findComment-655451 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.