The code below sort of works.
$zip = new ZipArchive;
if($zip->open($path) === TRUE) {
$zip->renameName('list.csv', 'list'.$batch_id.'.csv');
$zip->extractTo('list_output');
$zip->close();
}
The file inside the zip is renamed, but it does not extract. If I remove the renameName line then it extracts fine. I need it to do both.
What about?
Would be easier on the CPU/Memory too.