改进Response类send方法

This commit is contained in:
thinkphp
2016-05-11 10:12:01 +08:00
parent 861328c797
commit 5a7840dfa8

View File

@@ -98,7 +98,7 @@ class Response
if ('' == $type) {
$type = self::$type ?: (IS_AJAX ? Config::get('default_ajax_return') : Config::get('default_return_type'));
}
$type = strtolower($type);
$data = $data ?: self::$data;
if (!headers_sent() && isset(self::$contentType[$type])) {