Login   Register  
PHP Classes
elePHPant
Icontem

File: example_tar.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Neleus  >  tarX  >  example_tar.php  >  Download  
File: example_tar.php
Role: Example script
Content type: text/plain
Description: store example
Class: tarX
Dump and restore directories into archive files
Author: By
Last change:
Date: 3 years ago
Size: 588 bytes
 

Contents

Class file image Download
<?php
  
require_once('dump_dir.php');

  
//Example:
  //put this file together with dump_dir.php to new directory inside your webserver root, for exmaple '_dump'
  //and give it (directory) write permissions.
  //Below code will dump all files of the webserver root to _dump/htdocs.tarx.dmp and _dump/htdocs.tarx.tree.
  //Also it will exclude all files and directories from <web root>/sites/default/files.
  
  
tar_x::dumpDirectory(dirname(__FILE__).'/..', array(dirname(__FILE__).'/../sites/default/files'), dirname(__FILE__).'/htdocs.tarx');
  print 
'Dump completed';
  
?>