コード例 #1
0
ファイル: RestService.php プロジェクト: jglaine/sugar761-ent
 /**
  * Set response to be read from file
  */
 public function fileResponse($filename)
 {
     if (empty($this->response)) {
         return false;
     }
     $this->response->setType(RestResponse::FILE)->setFilename($filename);
     $this->response->setHeader("Pragma", "public");
     $this->response->setHeader("Cache-Control", "max-age=1, post-check=0, pre-check=0");
     $this->response->setHeader("X-Content-Type-Options", "nosniff");
 }