$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();linux 服务器上面,PHP已经安装了swoole扩展, 运行报错:PHP致命错误:无法找到类“swoole_http_server”查看php的扩展,可以看到 swoole 扩展。请教一下大神
- 3 回答
- 1 关注
- 2372 浏览
添加回答
举报
0/150
提交
取消