Пример #1
0
 public function Load($files, $app)
 {
     foreach ($files as $file => $value) {
         $regExp = new RegExp();
         $log = "uploads/" . $regExp->match($value["path"]);
         $res = $app->response();
         $res['Content-Description'] = 'File Transfer';
         $res['Content-Type'] = 'application/octet-stream';
         $res['Content-Disposition'] = 'attachment; filename=' . basename($log);
         $res['Content-Transfer-Encoding'] = 'binary';
         $res['Expires'] = '0';
         $res['Cache-Control'] = 'must-revalidate';
         $res['Pragma'] = 'public';
         $res['Content-Length'] = filesize($log);
         readfile($log);
         ini_set('display_errors', 'Off');
     }
     $foo2 = new Foo();
     $foo2->token = $this->token;
     $foomapper2 = new FooMapper($this->db);
     $foomapper2->updatecount($foo2);
 }