Zubrag.com :: Forum

Programmers Lounge => Tips and Tricks => Topic started by: zubrag on January 30, 2007, 04:57:53 PM



Title: how to unzip files in php
Post by: zubrag on January 30, 2007, 04:57:53 PM
If you are on Unix/Linux the easiest way would be:

<?php

$filename = escapeshellarg ($_GET['filename']);
$destination_folder = escapeshellarg($_GET['destination_folder']);

echo shell_exec ("unzip -ou $filename -d $destination_folder");

?>

This will not work if safe_mode is on


Title: Re: how to unzip files in php
Post by: basheer on August 27, 2009, 11:20:38 PM
how to write a php code for upload and  :odownload a file


Title: Re: how to unzip files in php
Post by: sifulffc on May 31, 2010, 02:17:54 PM
Recently I've been developing things with quite a bit of automation. PHP generates files amazingly fast, but using ftp_put and FTP'ing files into the server can be incredible slow if you have a massive amount of files. It's much faster to upload a single zipped file. I know you could easily zip the files yourself, but alas, laziness makes me write more code and save those valuable seconds.

Mazda Miata Parts (http://www.carpartswarehouse.com/carmodels/CP9/Mazda/Miata.html)


Title: Re: how to unzip files in php
Post by: boomsticks53 on June 20, 2010, 09:03:43 PM
I never had any problem in unzip unless its password  protected


Title: Re: how to unzip files in php
Post by: albertjooger on April 13, 2011, 08:25:20 AM
Its can just be occur because of your losting password.