Copy extracted files from ZIP to directory

laithaiphu

New Member
Note: I'm on localhost, so CHMOD'ing is not the answer.Anyway, I can't get to copy the files which were extracted from a ZIP to a directory, the files are extracted, but they won't be copied... the files just lay in the root folder where \[code\]upload.php\[/code\] is. I've got this:\[code\]exec('unzip ' . $_FILES['file']['tmp_name'], $ary, $output);$img = 0;$number = count($ary);foreach($ary as $file){ copy($file, 'i/'); unlink($file); $img++;}echo $img . '/' . $number;\[/code\]It outputs 11/11, so thats good... but the files are not copied and the original files are not deleted. Why isn't it copying them?
 
Back
Top