升级到31版本、修改学生成绩筛选

This commit is contained in:
巴掌 committed 2018-12-11 10:59:15 +08:00
1 parent a79e7bf237
commit d8ec4fad39
34 files changed
+447 -114

No files matched your search

+13 -2
View File
@@ -20,7 +20,7 @@ class Download extends Response
protected $name;
protected $mimeType;
protected $isContent = false;
protected $openinBrower = false;
/**
* 处理数据
* @access protected
@@ -53,7 +53,7 @@ class Download extends Response
$this->header['Pragma'] = 'public';
$this->header['Content-Type'] = $mimeType ?: 'application/octet-stream';
$this->header['Cache-control'] = 'max-age=' . $this->expire;
$this->header['Content-Disposition'] = 'attachment; filename="' . $name . '"';
$this->header['Content-Disposition'] = $this->openinBrower ? 'inline' : 'attachment; filename="' . $name . '"';
$this->header['Content-Length'] = $size;
$this->header['Content-Transfer-Encoding'] = 'binary';
$this->header['Expires'] = gmdate("D, d M Y H:i:s", time() + $this->expire) . ' GMT';
@@ -134,4 +134,15 @@ class Download extends Response
return $this;
}
/**
* 设置是否在浏览器中显示文件
* @access public
* @param bool $openinBrower 是否在浏览器中显示文件
* @return $this
*/
public function openinBrower($openinBrower) {
$this->openinBrower = $openinBrower;
return $this;
}
}