鍍金池/ 問答/PHP  Linux/ swoole安裝問題

swoole安裝問題

試了下按照swoole創(chuàng)建tcp,但是遇到了一些問題。不是很懂linux,特來請教。

clipboard.png
這里意思是我已經(jīng)開啟了 r.php進程的意思嗎?

這是端口使用情況

clipboard.png

我輸入了hello并沒有任何反應(yīng)這是為什么呢?
clipboard.png

參考資料:https://wiki.swoole.com/wiki/...

r.php的內(nèi)容為

$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();

回答
編輯回答
夏夕

上面寫的很清楚 端口被占用,kill掉之后再運行

2018年3月16日 21:10
編輯回答
我甘愿

報錯寫清楚了,
clipboard.png

2017年10月15日 22:41