Using PHP Post to unzip a zipped file archive
<p>For some reason I can't seem to get the following code to work. I have a form which accesses it, and I've passed a .zip file through it but still no luck? Any clues?</p>

<pre><code>&lt;?php
$file = $_POST['zipped_file'];
$zip = new ZipArchive();
if ($zip-&gt;open($file) !== TRUE) {
die ('Could not open archive');
}
$zip-&gt;extractTo('../img/media');
$zip-&gt;close();
echo 'Archive extracted to directory';
?&gt;
</code></pre>
