NOTICE php_swoole_http_onReceive (ERROR 1005): connection[1] is closed.

用文档里面的实例写了个hello world,但是客户端一访问就报错了,客户端也是pedding中得不到响应。报错如下: Swoole http server is started at http://127.0.0.1:9501 [2018-12-29 14:29:51 *34892.1] NOTICE php_swoole_http_onReceive (ERROR 1005): connection[1] is closed.

demo:


$http = new swoole_http_server("127.0.0.1", 9501);

$http->on("start", function ($server) {
    echo "Swoole http server is started at http://127.0.0.1:9501\n";
});

$http->on("request", function ($request, $response) {
    $response->header("Content-Type", "text/plain");
    $response->end("Hello World\n");
});

$http->start();
2018-12-29 15:01
0
0

郭大侠 - QQ:348755783

赞同来自:

什么环境?

2019-02-11 20:33

要回复问题请先登录注册