Experiment with the Hello CGI example presesnted in Figures 9.10 and Figure 9.11.
a. Obtain the source files for the Hello CGI example presesnted in Figures 9.10 and Figure 9.11.
b. Install hello.html on the web server: be sure to open its access to world-readable.
c. Compile hello.c (with util.c for the query-string processing routines) to generate an executable Hello.cgi. (The command is%gcc hello.c util.c -o hello.cgi). Install hello.cgi on the web server: be sure to open its access to world-readable and world-executable.
d. Open a browser and specify the URL for hello.html. When the page is displayed, press the button to submit the form and invoke hello.cgi.
e. Summarize the experiment and report the result.
hello.c was compiled as follows:
gcc hello.c –o hello.cgi
The resulting excutable, hello.cgi, along with hello.html, was filed in the subdirectory www in my home directory, and the access for files (and their directory path) were set to world executable:
chmod 755 hello.cgi
When http://www.csc.calpoly.edu/~mliu/form.html was entered to a browser, the “web form” hello.html was fetched from the HTTP server and displayed. When the submit button displayed with the form was pressed, the CGI script hello.cgi was invoked by the server, which generated a dynamic web page.
The message “Hello there” in blue color and large font was displayed by the browser, as per the dynamic HTML page generated by the web script hello.cgi.
You might also like to view...
When a method is ____________, it means that multiple methods in the same class have the same name but use different types of parameters.
a. parameterized b. shadowed c. aliased d. overloaded
The ________ tab of the Properties dialog box also includes commands to sort the data in the PivotTable
Fill in the blank(s) with correct word
A popular trend uses filters to create _________________________, or recognizable pictures made up of many smaller pictures.
Fill in the blank(s) with the appropriate word(s).
One or more anchor points joined by line segments is called a(n) ___________________.
Fill in the blank(s) with the appropriate word(s).