添加表单解析

This commit is contained in:
maxupeng
2012-12-04 16:31:22 +08:00
parent c0940a326d
commit 2948f20edd

1
4.1.md
View File

@@ -45,6 +45,7 @@ http包里面有一个很简单的方式就可以获取我们在前面web的
}
func login(w http.ResponseWriter, r *http.Request) {
r.ParseForm()
fmt.Println("method:", r.Method) //获取请求的方法
if r.Method == "GET" {
t, _ := template.ParseFiles("login.gtpl")