Page 1 of 1

Web Server Content with string array

Posted: Thu Feb 01, 2018 7:09 pm
by ats3788
Hello I try to setup a web server

Something like this works

client.println(HTML_Header[0]);
client.println(HTML_Header[1]);
client.println(HTML_Header[2]);
client.println(HTML_Header[3]);
client.println(HTML_Header[4]);


In a loop like this it's causing a reboot of the ESP32
for(i=0; i<5; i++)
{
client.println(HTML_Header);
}

To do this Serial.println(HTML_Header);
is working

I had the same Problem with the ESP8266

How can I use a String Array in the

Re: Web Server Content with string array

Posted: Fri Feb 02, 2018 3:15 am
by ESP_Sprite
Moved General Discussion -> Arduino

Re: Web Server Content with string array

Posted: Fri Feb 02, 2018 4:20 pm
by ats3788
Hi solved the Problem with using sts:string Class
and every string has less then 30 chars like


std::string HTML_Header[] = { "<!doctype html>",
"<html>",
"<head>",
"<title>Temperature and",
" Humititdy Server</title>",
"<meta charset= \"UTF-8\">"

I don't know if that is working witch char arrays but i think it should