public function CLItemplate() { \models\data::$DB = 'FA16'; // should return a zip file $student = new \models\student(\models\data::ID('YNUZ')); $outline = \models\outline::BUILD($student, $student->course . '.zip'); }
protected function GETtemplate(Student $student) { $file = tempnam('/tmp', 'zip'); \models\outline::BUILD($student, $file); ///Then download the zipped file. ob_clean(); ob_end_flush(); header("Content-Type: application/zip"); header("Content-Length: " . filesize($file)); header("Content-Disposition: attachment; filename={$student->course}.zip"); readfile($file); @unlink($file); exit; }