PHP 8.5.0 Alpha 4 available for testing

Voting

: min(eight, nine)?
(Example: nine)

The Note You're Voting On

shano
13 years ago
thought it might come in handy
recursively adds all directories and files within a directory

class zip extends ZipArchive {

public function addDirectory($dir) { // adds directory
foreach(glob($dir . '/*') as $file) {
if(is_dir($file))
$this->addDirectory($file);
else
$this->addFile($file);
}
}
}

<< Back to user notes page

To Top