How to unzip zip file using PHP script ?

Here is the code for How to unzip zip file using PHP script . By this code you can easily zip or unzip your files and folders using PHP.
Some hosting provider don’t provide zip unzip facility on server control panel, so there is always problem for upload your project and download your code from it. we have a best solution for all developers and server admins that they can easilly make zip and unzip their files by using simple code for unzip zip file using PHP.
Dear Visitor , if you want to unzip , zip file , please find below script to unzip zip file.

Unzip zip file using PHP

Requirement:-
(PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.1.0)

ZipArchive::extractTo — Extract the archive contents and

Syntax:-
bool ZipArchive::extractTo ( string $destination [, mixed $entries ] )

Description:
Extract the complete archive or the given files to the specified destination.

<?php $unzip = new ZipArchive; $out = $unzip->open('your-zip-filename.zip');
if ($out === TRUE) {
  $unzip->extractTo(getcwd());
  $unzip->close();
  echo 'File unzipped Successfully';
} else {
  echo 'Something went wrong , Please Try Again ?';
}
?>

We hope this code will helps you to zip unzip file using php also make easy to upload and download your project.
also check How to disable right click, F12 & Ctrl+U .