改进Request类的type方法判断

This commit is contained in:
thinkphp
2016-09-02 12:24:40 +08:00
parent 6d18c644ac
commit 4bde059d08
2 changed files with 3 additions and 2 deletions

View File

@@ -27,7 +27,7 @@ ThinkPHP5在保持快速开发和大道至简的核心理念不变的同时PH
+ 方便的自动生成定义
+ 真正惰性加载
+ 分布式环境支持
+ 更多的社交类库
+ 支持Composer
> ThinkPHP5的运行环境要求PHP5.4以上。
@@ -53,6 +53,7 @@ www WEB部署目录或者子目录
│ ├─common.php 公共函数文件
│ ├─config.php 公共配置文件
│ ├─route.php 路由配置文件
│ ├─tags.php 应用行为扩展定义文件
│ └─database.php 数据库配置文件
├─public WEB目录对外访问目录

View File

@@ -93,7 +93,6 @@ class Request
* @var array 资源类型
*/
protected $mimeType = [
'html' => 'text/html,application/xhtml+xml,*/*',
'xml' => 'application/xml,text/xml,application/x-xml',
'json' => 'application/json,text/x-json,application/jsonrequest,text/json',
'js' => 'text/javascript,application/javascript,application/x-javascript',
@@ -107,6 +106,7 @@ class Request
'jpg' => 'image/jpg,image/jpeg,image/pjpeg',
'gif' => 'image/gif',
'csv' => 'text/csv',
'html' => 'text/html,application/xhtml+xml,*/*',
];
protected $content;