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...
________ is a new method of storing application software files as text with accompanying information on file exchange between different operating systems
Fill in the blank(s) with correct word
In Windows 10, the bar at the top of a window is the title bar
Indicate whether the statement is true or false