Commit 32c9e2ff authored by tufengqi's avatar tufengqi

finish

parent 70f31f44
......@@ -118,7 +118,8 @@ class Application extends Component
setcookie(VERSION_KEY, $set_cookie_val, time() + 3600 * 24 * 7);
$header_arr = ['Content-type' => 'application/javascript;charset=utf-8'];
$header_arr = array_merge($header_arr, ResponseMsg::getDefaultHeader());
echo response()->withHeaders($header_arr)->withContent('');
response()->withHeaders($header_arr);
\Yii::$app->response->send();
return;
}
$header_arr = [];
......@@ -134,7 +135,9 @@ class Application extends Component
}
$content = ob_get_contents();
ob_end_clean();
echo response()->withHeaders($header_arr)->withContent($content);
response()->withHeaders($header_arr);
\Yii::$app->response->send();
echo $content;
}
private function isOnlineHost($host_name)
......
......@@ -7,7 +7,6 @@ class response
foreach ($header_arr as $key => $val) {
\Yii::$app->response->headers->add($key, $val);
}
\Yii::$app->response->send();
return $this;
}
public function withContent($content)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment