Loading
Loading
استضافة ملفات HTML كاملة داخل اللوحة.
#include <SPIFFS.h>
#include <WebServer.h>
WebServer server(80);
void setup() {
SPIFFS.begin(true);
server.serveStatic("/", SPIFFS, "/index.html");
server.begin();
}
void loop() {
server.handleClient();
}نسيان رفع الملفات لـ SPIFFS. مجرد كتابة الكود لا يرفع الملفات، يجب استخدام إضافة Arduino ESP32 SPIFFS Data Upload لرفع محتويات مجلد 'data'.