#1121·hertz

[问题] 静态方法在相对路径下不起作用。

作者: TinyBeer创建于 2024年5月23日更新于 2026年2月2日
标签question

描述错误

我试图更改静态方法的相对路径,例如 h.Static("/static/", "./static")。当访问 http://127.0.0.1:8888/static/hello.txt 时,它返回了消息 [Cannot open requested path]。出现了错误报告。

内容来源: cloudwego/hertz