EXAMPLES
PIC 40A, Winter 2004
Examples from the Source Code
Archive published in the optional textbook for the course:
M.Hall, L.Brown
"Core Web Programming" 2nd ed. Prentice Hall 2001.
ISBN 0-13-089793-0. To view the actual source code of each page, please
choose an appropriate command from the menu bar of your browser of choice,
for example: View -> Source
(for Internet Explorer) or
View -> Page Source
(for Netscape Navigator).
- Examples from Chapter 1 "Designing Web Pages with
HTML 4.0".
- Examples from Chapter 2 "Block-Level Elements in
HTML 4.0".
- Examples from Chapter 3 "Text-Level Elements in
HTML 4.0".
- Examples from Chapter 4 "Frames".
- Examples from Chapter 18 "HTML Forms".
-
The very first example of a simple CGI application which returns
information about the web server on which it is running.
-
A CGI application which just parses an HTML form and returns
information about the user input in the form of
NAME/VALUE
pairs. First version uses "GET"
method with a Perl script,
second version uses "POST"
method with a Perl script, while
the third version is absolutely equivalent to the second except that
the CGI program is implemented in C. This example is based on code
from "Beginning Linux Programming" by N.Matthew and R.Stones.
-
An excellent example from
textbook [1]. A CGI script that displays a table of all of the
environment variables that CGI and your web server define, along with
a brief explanation of the standard variables:
-
An excellent example from
textbook [1]. A CGI script that allows clients to upload files to
server:
-
A partial solution to Homework Project
5. Please be aware that this is not a complete solution, but rather
an implementation of the bare-bones functionality required, without any
error checking, file locking and security constraints necessary for the
complete solution.
Last modified on
by fedandr@math.ucla.edu.