Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php extract zip

<?php
$unzip = new ZipArchive;
$out = $unzip->open('wordpress.zip');
if ($out === TRUE) {
  $unzip->extractTo(getcwd());
  $unzip->close();
  echo 'File unzipped';
} else {
  echo 'Error';
}
?>
Comment

php read zip file without extracting

As found as a comment on http://www.php.net/ziparchive:

The following code can be used to get a list of all the file names in a zip file.

<?php
$za = new ZipArchive(); 

$za->open('theZip.zip'); 

for( $i = 0; $i < $za->numFiles; $i++ ){ 
    $stat = $za->statIndex( $i ); 
    print_r( basename( $stat['name'] ) . PHP_EOL ); 
}
?>
Comment

PREVIOUS NEXT
Code Example
Php :: maintaining serial number in laravel pagination table 
Php :: laravel 8 make model with migration and controller 
Php :: Remove public from the url in the codeigniter 
Php :: use id as key in co;lection laravel 
Php :: Create a laravel project with any version 
Php :: php binary to base64 
Php :: laravel create new migration 
Php :: Ways to write comments in PHP 
Php :: composer update php mbstring.so missing 
Php :: option selected in laravel blade 
Php :: pagination with search query in laravel 
Php :: The configuration file now needs a secret passphrase (blowfish_secret). 
Php :: php date function get previous month 
Php :: how to retrieve image from database in php mysqli 
Php :: php header redirect with parameters 
Php :: aes php 
Php :: wp shortcode 
Php :: wp post featured image not showing admin 
Php :: wp get_posts return ids 
Php :: get day by date in php 
Php :: IlluminateContractsContainerBindingResolutionException target calss does not exist 
Php :: php pdo postegresql connection 
Php :: how increase php upload size in wordpress 
Php :: wherejsoncontains laravel 
Php :: jquery serialize php decode 
Php :: laravel 8 eloquent orderby 
Php :: add array to array php 
Php :: laravel form request validation unique update 
Php :: heredoc php 
Php :: laravel collection isempty 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =