gin web 读取文件失败The system cannot find the path specified

linkyang · · 917 次点击
图片是错误的,dir 参数是没有的,忘记恢复到修改前的状态了![1690123975503.png](https://static.golangjob.cn/230723/58885f87bc8d92c90678fc5e20adcc84.png)
#1
更多评论
问题解决了,用os.Getwd(),我测试出现错误: 1.路径错误了,绝对路径错了,但是为啥相对路径不能用,不知道为啥 2.测试的时候用PS C:\Users\Administrator> D:\新建文件夹\smsserver_xls.exe 这样的方式测试的,导致测试出来的路径不对导致的 对应为啥相对路径不能用,请指导下,谢谢
#2