think\Response::contentType PHP Method

contentType() public method

页面输出类型
public contentType ( string $contentType, string $charset = 'utf-8' )
$contentType string 输出类型
$charset string 输出编码
    public function contentType($contentType, $charset = 'utf-8')
    {
        $this->header['Content-Type'] = $contentType . '; charset=' . $charset;
        return $this;
    }