代码:http.HandleFunc("/", api.Index)http.HandleFunc("/list", api.FileList)http.HandleFunc("/api/upload", api.UploadFile)http.HandleFunc("/api/delete", api.DeleteFile)http.Handle("/files", http.StripPrefix("/files/", http.FileServer(http.Dir(settings.FilesPath))))http.ListenAndServe(":1234", nil)结果1:http://本地主机:1234/http://localhost:1234/列表http://localhost:1234/文件匹配 ”/”api.index(第二个和第三个是错误的)结果2:http://localhost:1234/api/上传http://localhost:1234/api/删除匹配“/api/xxx”api.xxx(没错)环境:转到 1.13.5 窗口/amd64我应该怎么做才能解决这个问题?
- 1 回答
- 0 关注
- 95 浏览
添加回答
举报
0/150
提交
取消