
Go
1 2 3 4 5 6 7 8 9 | package mainimport (
"fmt"
_ "fmt"
"net/http"
_ "os" )func main() {
http.HandleFunc( "/" , handle)
http.ListenAndServe( "0.0.0.0:8082" ,nil)}func handle(w http.ResponseWriter,r *http.Request) {
fmt.Fprint(w, "URL=" ,r.URL.Path)
fmt.Println(r.RequestURI)}
|
Salin selepas log masuk
相关学习推荐:PHP编程从入门到精通

PHP内置服务

Swoole
1 2 | $http = new Swoole\Http\Server( "0.0.0.0" , 9501); $http ->on('request', function ( $request , $response ) {
echo 1;}); $http ->start();
|
Salin selepas log masuk

Atas ialah kandungan terperinci Go,PHP,Swoole 并发测试详解. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!