Пример #1
0
 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');
 }
Пример #2
0
 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;
 }