Arduino 更新/删除网页ESP8266 Web服务器

Arduino 更新/删除网页ESP8266 Web服务器,arduino,webserver,esp8266,arduino-esp8266,Arduino,Webserver,Esp8266,Arduino Esp8266,我正在使用ESP8266的图书馆。可以使用以下方法将文件提供给特定的文件名: ... void example() { sendFile(200, "text/html", data_example, sizeof(data_example)); } ... webServer.on ("/example.html", example); 一旦文件被送达,它就不能通过执行server.on(“/example.html”,example2)来更新 如何删除托管文件(或将其更新为空白文

我正在使用ESP8266的图书馆。可以使用以下方法将文件提供给特定的文件名:

...

void example() {
  sendFile(200, "text/html", data_example, sizeof(data_example));
}

...

webServer.on ("/example.html", example);
一旦文件被送达,它就不能通过执行
server.on(“/example.html”,example2)来更新


如何删除托管文件(或将其更新为空白文件),使其返回404错误?

为什么不在示例()函数中包含条件逻辑,以便在必要时提供404页

希望能有所帮助。

如果(某些情况下)提供文件();else SERVICE_404_error()