Unzip a file with php

I want to unzip a file and this works fine

system('unzip File.zip');

But I need to pass in the file name through the URL and can not get it to work, this is what I have.

$master = $_GET["master"];
system('unzip $master.zip'); 

What am I missing? I know it has to be something small and stupid I am overlooking.

Thank you,

12 Answers
12

Leave a Comment