0
    $json_path = BUILDERUX_JSON_UPLOAD . $json_folder . '/';


$zip = new ZipArchive;

$res = $zip->open(BUILDERUX_JSON_UPLOAD.$filename);

if ($res === TRUE)
    {
        echo "working1";
    $zip->extractTo($json_path);
    $zip->close();
}

path is correct but file is not extract and getting 19 error message .

Im having issues with my code being able to open a zip file that i have uploaded and moved into a folder, the zip file uploads fine and you can open it in any Zip program however, when i attempt to open it with ZipArchive to extract the data it errors.

When i run the code it shows me a Error Code 19

1 Answers1

0

Having a look at the docs and this entry, error code 19 could be that the file is not a zip archive.

alistaircol
  • 1,433
  • 12
  • 22