Search
 
SCRIPT & CODE EXAMPLE
 

PHP

unzip file php

$zip = new ZipArchive;
$res = $zip->open('file.zip');
if ($res === TRUE) {
  $zip->extractTo('/myzips/extract_path/');
  $zip->close();
  echo 'woot!';
} else {
  echo 'doh!';
}
Comment

install php unzip

(sudo) yum install zip unzip php-zip
(sudo) apt install zip unzip php-zip
Comment

PREVIOUS NEXT
Code Example
Php :: laravel find or fail exception 
Php :: php get ip address of visitor 
Php :: How to Get the last element of an array in PHP – end() 
Php :: read key value json php 
Php :: check if number is float in php 
Php :: laravel collection toArray 
Php :: php close window after script runs 
Php :: create laravel project using laravel installer 
Php :: with in relation laravel 
Php :: using js variable in php 
Php :: wordpress custom loop latest first 
Php :: php get location of user 
Php :: pdo connexion 
Php :: carbon parse subday 
Php :: cut string in php 
Php :: php ping time 
Php :: array empty check in php 
Php :: how to get length of object in php 
Php :: php regex validate username 
Php :: php get string between two strings 
Php :: doument root phpp 
Php :: object to array in php 
Php :: Hide all updates from WordPress 
Php :: how tdo you convert a stringto lowercase in php 
Php :: phpmailer with laravel 
Php :: file original extensions laravel 
Php :: laravel plural 
Php :: shuffle php function 
Php :: php strip tags 
Php :: override Telescope in laravel 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =