File: example_tar.php

Recommend this page to a friend!
  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: 10 years ago
Size: 588 bytes


Class file image Download

  //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');
'Dump completed';

For more information send a message to info at phpclasses dot org.