Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Pascal Rehfeldt  >  ZIPlib  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: demonstrates the class
Class: ZIPlib
Class to generate ZIP files.
Author: By
Last change:
Date: 2003-04-14 09:36
Size: 535 bytes
 

Contents

Class file image Download
<?php

  
//Start Output buffering
  
ob_start();

  
//Load the Library
  
require('./zip.lib.php');

  
//Generate a new object
  
$zipfile = new zipfile('archive.zip','./DeepDir.php''./extendedfpdf.php');

  
//Add a plain text file as pdf
  
$zipfile->addFileAsPDF('testfiles/plain_text.txt''Title''Author');

  
//Add a complete dir (recursiv)
  
$zipfile->addDirContent('./');

  
//Add a single file
  
$zipfile->addFileAndRead('testfiles/picture.jpg');

  
//Output the new zip file
  
echo $zipfile->file();

?>