update page now

Voting

: eight minus zero?
(Example: nine)

The Note You're Voting On

peter at boring dot ch
16 years ago
Here's a little extension to ZipArchive that handles directories recursively:

<?php

class Zipper extends ZipArchive {
    
public function addDir($path) {
    print 'adding ' . $path . '<br>';
    $this->addEmptyDir($path);
    $nodes = glob($path . '/*');
    foreach ($nodes as $node) {
        print $node . '<br>';
        if (is_dir($node)) {
            $this->addDir($node);
        } else if (is_file($node))  {
            $this->addFile($node);
        }
    }
}
    
} // class Zipper

?>

<< Back to user notes page

To Top