mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
修复header已发送仍调用header函数的notice
This commit is contained in:
@@ -33,7 +33,7 @@ class Response
|
|||||||
'text' => 'text/plain',
|
'text' => 'text/plain',
|
||||||
];
|
];
|
||||||
$type = strtolower($type);
|
$type = strtolower($type);
|
||||||
if (isset($headers[$type])) {
|
if (!headers_sent() && isset($headers[$type])) {
|
||||||
header('Content-Type:' . $headers[$type] . '; charset=utf-8');
|
header('Content-Type:' . $headers[$type] . '; charset=utf-8');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user