Answer the question
In order to leave comments, you need to log in
How to unpack the data contained in a php variable using ZipArchive?
Good day everyone, I need your help, how to unpack the data contained in the variable xlsx data using ZipArchive or the Zip Function.
It is very important from the variable , do not pass the path
Answer the question
In order to leave comments, you need to log in
try like this :
file_put_contents('php://memory', $text); // $text - это переменная с текстом зипа
$zip = new ZipArchive;
$res = $zip->open('php://memory'));
if ($res === TRUE) {
// распаковываем файл куда надо , $path - путь
$zip->extractTo($path);
$zip->close();
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question