打开 http://120.24.244.77/phpinfo.php 可以看到 swoole 成功运行,但是运行下面的这个代码没效果:
<?php
$http = new swoole_http_server("0.0.0.0", 9503);
$http->on('request', function (swoole_http_request $request, soole_http_response $response) {
$response->end("<h1>Hello Swoole. #".rand(1000, 9999)."</h1>");
});
$http->start();
bash 运行: http_server.php 后访问 http://120.24.244.77:9503 没任何效果,服务器是 nginx , php 是 5.6 , SSH 的账号是: root ,密码是 CS88.com ,文件目录在 /data/wwwroot/default
<?php
$http = new swoole_http_server("0.0.0.0", 9503);
$http->on('request', function (swoole_http_request $request, soole_http_response $response) {
$response->end("<h1>Hello Swoole. #".rand(1000, 9999)."</h1>");
});
$http->start();
bash 运行: http_server.php 后访问 http://120.24.244.77:9503 没任何效果,服务器是 nginx , php 是 5.6 , SSH 的账号是: root ,密码是 CS88.com ,文件目录在 /data/wwwroot/default
