Top / CGI | Japanese |
Created: | 2003-03-25 |
Last updated: | 2003-09-20 |
Source: | hello.cpp (Need compile) |
Sample: | hello |
First sample shows the most primitive case of CGI by C++. This doesn't use jj/CGI, but I think it is good introduction for it.
That is, "Hello,World" by CGI/C++;-)
I know this CGI doesn't have any advantage than static HTML text. This is just first example...
Source: | put_a.cpp (Need compile) |
Sample: | put_a.html |
put_a puts the value of text field named 'a'.
put_a.cpp shows that creation of form object typed jjCGI_form, parse CGI input data, and get the value of field 'a' by form["a"].
Source: | put_all.cpp (Need compile) |
Sample: | put_all.html |
This sample shows how to scan all of values in the form.
put_all.cpp shows how to use jj/Pattern library which is a base of jj/CGI.
Source: | multi_value.cpp (Need compile) |
Sample: | multi_value.html |
Source: | fupload.cpp (Need compile) |
Sample: | fupload.html |
In jj/CGI, uploaded file is accessed by user's CGI program through temporary filename saved at server as follows:
form._server_filename[field_name] |
<input type="file" name="field_name"> |
Usually, _server_filename[] member is enough to handle uploaded file. The other attributes related to file-uploading are as follows:
_client_filename[] | Client side file name |
_ctype[] | type of file |