PHP Classes
Icontem

File: example2.php


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend! ReTweet ReTweet Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Joshua Townsend  >  Zip File  >  example2.php  
File: example2.php
Role: Example script
Content type: text/plain
Description: Example of using class to read a zip file
Class: Zip File
Create and extract ZIP archives in purely in PHP
 

Contents

Class file image Download
<?php
require "zip.class.php"// Get the zipfile class
$zipfile = new zipfile// Create an object
$zipfile->read_zip("myzip.zip"); // Read the zip file

// Now, $zipfile->files is an array containing information about the files
// Here is an example of it's use

foreach($zipfile->files as $filea)
{
    echo 
"The contents of {$filea['name']}:\n{$file['data']}\n\n";
}
?>

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2009 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products