Loading images of different media such as css beside just him from sd card
i reading this code , lost when reach point
my question filename variable storing in each if condition ?
usually when read programming language open file , read line line , or different strategy,.
but here don't
code: [select]
if (strstr(filename, ".htm") != 0)
client.println("content-type: text/html");
else if (strstr(filename, ".css") != 0)
client.println("content-type: text/css");
else if (strstr(filename, ".png") != 0)
client.println("content-type: image/png");
else if (strstr(filename, ".jpg") != 0)
client.println("content-type: image/jpeg");
my question filename variable storing in each if condition ?
usually when read programming language open file , read line line , or different strategy,.
but here don't


strstr checks string see if string present inside of it. first if checks see if filename contains .htm, html file. second 1 checks see if contains .css css file. appears sending client let him know type of file coming.
filename has been setup somewhere else didn't show me part of code don't know.
filename has been setup somewhere else didn't show me part of code don't know.
Arduino Forum > Using Arduino > Programming Questions > Loading images of different media such as css beside just him from sd card
arduino
Comments
Post a Comment