Reply to Re: [PHP] zipped files

Your name:

Reply:


Posted by "Richard Lynch" on 10/26/05 20:05

On Wed, October 26, 2005 5:44 am, Clive wrote:
> does any one have code/examples for unzipping a file thats been
> uploaded
> to a server. I would prefer a class rather than something that uses
> zip.lib as it may not be configured on the server.

$path = "/full/path/to/uploaded/file.zip";
exec("/full/path/to/bin/unzip $path", $output, $error);
if ($error){
die("OS Error: $error<br />\n" . nl2br($output));
}
$unzipped = str_replace(".zip", '', $path);
$file = file_get_contents($unzipped);

--
Like Music?
http://l-i-e.com/artists.htm

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация