我在 SPIFFS 中存储了一张图像当我启动浏览器并输入 esp8266 IP 地址/images/image.jpg 时,我可以看到该图像。该图像还显示在根目录的 index.html 页面中。
当我生成一个页面时
server.send(500, "text/html", "<head><title>esp8266</title></head><body><div id=\"banner\"><img src=\"/images/image.jpg\" width=\"900\" height=\"295\" /></div> <div id=\"page\"></body</html>");
该页面不显示图像,只是一个图像占位符。而且我无法再通过 IP 地址/images/image.jpg 访问该图像。我在想 server.send() 改变了根的上下文。
感谢您的任何帮助。