Esempio n. 1
0
 public function archive($build = FALSE)
 {
     if ($build === 'build') {
         // Load archive
         $archive = new Archive('zip');
         // Download the application/views directory
         $archive->add(APPPATH . 'views/', 'app_views/', TRUE);
         // Download the built archive
         $archive->download('test.zip');
     } else {
         echo html::anchor(Router::$current_uri . '/build', 'Download views');
     }
 }