改名
This commit is contained in:
@@ -209,11 +209,11 @@ class Response extends HttpService
|
||||
private function printResult($result): void
|
||||
{
|
||||
$result = Help::toString($result);
|
||||
$string = 'Command Result: ' . PHP_EOL . PHP_EOL;
|
||||
fire('CONSOLE_END');
|
||||
if (str_contains((string)$result, 'Event::rshutdown(): Event::wait()')) {
|
||||
return;
|
||||
}
|
||||
$string = 'Command Result: ' . PHP_EOL . PHP_EOL;
|
||||
if (empty($result)) {
|
||||
$string .= 'success!' . PHP_EOL . PHP_EOL;
|
||||
} else {
|
||||
@@ -224,6 +224,7 @@ class Response extends HttpService
|
||||
|
||||
/**
|
||||
* @param $sendData
|
||||
* @throws Exception
|
||||
*/
|
||||
private function sendData($sendData): void
|
||||
{
|
||||
|
||||
@@ -513,7 +513,7 @@ class Router extends HttpService implements RouterInterface
|
||||
$node = $this->find_path($request);
|
||||
if (!($node instanceof Node)) {
|
||||
$this->response->setFormat(Response::HTML);
|
||||
$this->response->send('<h1 style="text-align: center;">404</h1>');
|
||||
$this->response->send('<h2>HTTP 404 Not Found</h2><hr><i>Powered by Swoole</i>');
|
||||
} else {
|
||||
$this->response->send($node->dispatch(), 200);
|
||||
}
|
||||
@@ -526,7 +526,7 @@ class Router extends HttpService implements RouterInterface
|
||||
public function pageNotFound()
|
||||
{
|
||||
$this->response->setFormat(Response::HTML);
|
||||
$this->response->send('<h1 style="text-align: center;">404</h1>');
|
||||
$this->response->send('<h2>HTTP 404 Not Found</h2><hr><i>Powered by Swoole</i>');
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user