basic cgi script test working

This commit is contained in:
hugogogo
2022-08-15 18:26:41 +02:00
parent 6ad6ec7d63
commit 1c13e254d5
6 changed files with 74 additions and 75 deletions

View File

@@ -17,10 +17,13 @@
# define HTML_BODY_TOP "<!DOCTYPE html>"\
"<html>"\
" <head>"\
" <meta charset=\"UTF-8\">"\
" <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">"\
" <title>CGI</title>"\
" <link href=\"./cgi_style.css\" type=\"text/css\" rel=\"stylesheet\">"\
" </head>"\
" <body>"\
" <h2>cgi</h2>"
" <h1>cgi</h1><br>"
# define HTML_BODY_BOTTOM " </body>"\
"</html>"
@@ -34,20 +37,16 @@ std::string
itos(int n);
std::string
fill_env(std::string env, std::string tag = "p");
parse_env(const std::string & env);
std::string
fill_tag(std::string env, std::string tag = "p");
parse_body();
std::string
fill_form(
std::string form,
std::string tag_key = "p",
std::string tag_val = "p"
);
print_env(char **env, std::string tag = "p");
std::string
parse_form_infos();
print_form(std::string form, std::string key = "p", std::string val = "p");
#endif