golang The system cannot find the path specified.
2016-08-15 15:45
489 查看
指定的路径有误
package main import ( "net/http" "fmt" "strings" "log" "html/template" ) func sayHelloName(w http.ResponseWriter, r *http.Request) { r.ParseForm(); fmt.Println(r.Form) fmt.Println(r.URL.Path) fmt.Println(r.URL.Scheme) fmt.Println(r.Form["url_long"]) for k, v:= range r.Form{ fmt.Println("key: ", k) fmt.Println("value:", strings.Join(v, "")) } fmt.Fprintln(w, "hello nihao") } func login(w http.ResponseWriter, r *http.Request) { fmt.Println("method: ", r.Method) if r.Method == "GET" { t, err := template.ParseFiles("src/html/login.gtpl") if err != nil { fmt.Println(err) return } t.Execute(w, nil) } else { fmt.Println("username: ", r.Form["username"]) fmt.Println("password: ", r.Form["password"]) } } func main() { //http.HandleFunc("/", sayHelloName); http.HandleFunc("/login", login) err:= http.ListenAndServe(":9090", nil) if err != nil { log.Fatalf("Listen and server", err) } }
相关文章推荐
- SharePoint Error: 'Recycle IIS Application Pool': Win32: The system cannot find the path specified'
- 在DBeaver中phoenix查询报错:org.apache.phoenix.exception.PhoenixIOException: The system cannot find the path specified
- The system cannot find the path specified - Rails
- Window 启动Wnmp,提示: CreateFile() failed (2: The system cannot find the file specified
- 解决Fel:Cannot find the system Java compiler. Check that your class path includes tools.jar
- 【Complier】Makefile error make (e=2): The system cannot find the file specified
- RemotingException: “All pipe instances are busy.” or “The system cannot find the file specified.” ★★
- System.Security.Cryptography.CryptographicException: The system cannot find the file specified
- Error code 2: The system cannot find the file specified.
- make (e=2):The system cannot find the file specified
- SublimeText 2编译python出错的解决方法(The system cannot find the file specified)
- STSDev失败 The System cannot find the file specified 解决方案
- IIS Error - he system cannot find the file specified _找不到页面
- ... or one of its dependencies. The system cannot find the file specified... 加载指定dll失败
- win7安装docker报错:error during connect: Get http ..... the system cannot find the file specified
- Fixed: The Windows Process Activation Service service terminated with the following error: The system cannot find the file specified
- SublimeText 2编译python出错的解决方法(The system cannot find the file specified)
- (Error:The system cannot find the file specified)用C#生成.dll 供VB6的开发人员调用
- 找不到页面(The system cannot find the file specified)
- apache 错误:The system cannot find the file specified.