PHP Code to Extract Zip File - Php

How to unzip / extract zip file using php code?

Snippet Code


  
Rate this page :
  [ 0 votes]

Here, the below code can be used to extract "myfile.zip" file and stored in same file path.

<?php $zip = new ZipArchive; $zip->open('myfile.zip'); $zip->extractTo('./'); $zip->close(); ?>

Tags


Ask Questions

Ask Question