gocgi
1.0.0
용법:
import (
"net/http"
"github.com/anikhasibul/gocgi"
)
func main() {
http.HandleFunc("/", func (w http.ResponseWriter, r *http.Request) {
gocgi.CGIfy(w, r, "php-cgi", "./server.php")
})
http.ListenAndServe(":8080", nil)
}
Server.php :
<?php
echo "Hello, {$_GET['name']}";
방문 : http : // localhost : 8080/? name = world
Hello, World