1,请问一下,如何在c文件中定义一个网页格式的文件,比如文件名是404.html,文件内容为:
tional//EN">
404 - file not found
Try here instead.
2,或者有什么方法把这个文件转换为二进制文件。即转换成
data_404_html[] =
[
/* /404.html */
0x2F, 0x34, 0x30, 0x34, 0x2E, 0x68, 0x74, 0x6D,
0x6C, 0x00,
0x3C, 0x21, 0x44, 0x4F, 0x43, 0x54, 0x59, 0x50,
0x45, 0x20, 0x48, 0x54, 0x4D, 0x4C, 0x20, 0x50,
0x55, 0x42, 0x4C, 0x49, 0x43, 0x20, 0x22, 0x2D,
0x2F, 0x2F, 0x57, 0x33, 0x43, 0x2F, 0x2F, 0x44,
0x54, 0x44, 0x20, 0x48, 0x54, 0x4D, 0x4C, 0x20,
0x34, 0x2E, 0x30, 0x31, 0x20, 0x54, 0x72, 0x61,
0x6E, 0x73, 0x69, 0x74, 0x69, 0x6F, 0x6E, 0x61,
0x6C, 0x2F, 0x2F, 0x45, 0x4E, 0x22, 0x3E, 0x0A,
0x3C, 0x21, 0x2D, 0x2D, 0x20, 0x43, 0x6F, 0x70,
0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x28,
0x63, 0x29, 0x20, 0x32, 0x30, 0x30, 0x39, 0x20,
0x54, 0x65, 0x78, 0x61, 0x73, 0x20, 0x49, 0x6E,
0x73, 0x74, 0x72, 0x75, 0x6D, 0x65, 0x6E, 0x74, ]