-
Notifications
You must be signed in to change notification settings - Fork 555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
路由问题 #1097
Comments
没看懂要问啥🤨 |
没有定义相关路由的时候,系统会自动寻找相关静态文件。 |
代码咋写的发下 |
func GeneratedRegister(r *server.Hertz) {
} |
访问这个页面 /ghfghfgh/ind8ex.html 就会出现 Cannot open requested path {"level":"error","message":"HERTZ: Cannot open file="./static/ghfghfgh/ind8ex", error=open ./static/ghfghfgh/ind8ex: no such file or directory"} |
render里面加了这个,注释掉就好了。 |
This issue has been marked as invalid question, please give more information by following the |
有没有其他解决方案,直接当找不到文件的时候直接返回404,而不是给出这个“Cannot open requested path” |
This issue has been marked as invalid question, please give more information by following the |
当没有定义相关路由时,返回下面的错误:
Cannot open requested path
{"level":"error","message":"HERTZ: Cannot open file="./static/ghfghfgh/ind8ex.html", error=open ./static/ghfghfgh/ind8ex.html: no such file or directory"}
The text was updated successfully, but these errors were encountered: