Created
February 18, 2014 21:09
-
-
Save cukabeka/9080159 to your computer and use it in GitHub Desktop.
Backup Files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
#http://www.phpbuddy.eu/spl-standard-php-library.html?showall=1 | |
ini_set("max_execution_time", 0); | |
$verzeichnis = new RecursiveIteratorIterator( | |
new RecursiveDirectoryIterator( './redaxo' ), true ); | |
$zip = new ZipArchive; | |
$resource = $zip->open( 'redaxo.zip', ZipArchive::CREATE ); | |
if ($resource === TRUE) | |
{ | |
foreach ( $verzeichnis as $datei ) | |
{ | |
$zip->addFile( $datei, $datei ); | |
} | |
} | |
$zip->close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment