Chapter 29. cgi scripts

Now that nearly everyone has a Web server installed on their PCs, it seemed appropriate that a chapter on cgi scripts should be included as part of this shell programming book.

In this chapter we will cover:

  • basic cgi scripts;

  • using Server Side Includes;

  • the get method;

  • the post method;

  • creating an interactive script; and

  • a cgi script that automatically reloads a Web page.

You do not need to be on a network to run a Web server; you can run it from your local host. However, here I will assume you have a Web server installed (apache, Cern etc.) and a browser to display the Web pages (Netscape, Internet Explorer, etc.). In addition, the server has been cgi-enabled. By default this is disabled; just comment out the required lines. See later for more information.

It’s beyond the scope of this book to tell you how to install and configure a Web server, but it only takes about 20 minutes to get one up and running. The examples used in this chapter were run under the apache Web server, and the browser I used is Netscape.

This chapter will not go into detail about HTML or Web issues, since there are plenty of books on the market about these subjects already. Besides it would take several chapters to discuss HTML.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.185.251