$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 關注
- 2434 瀏覽
添加回答
舉報
0/150
提交
取消