📄 ch01_01.htm
字号:
<?label 1. Getting Started ?><html><head><title>Getting Started (CGI Programming with Perl)</title><link href="../style/style1.css" type="text/css" rel="stylesheet" /><meta name="DC.Creator" content="Scott Guelich, Gunther Birznieks and Shishir Gundavaram" /><meta scheme="MIME" content="text/xml" name="DC.Format" /><meta content="en-US" name="DC.Language" /><meta content="O'Reilly & Associates, Inc." name="DC.Publisher" /><meta scheme="ISBN" name="DC.Source" content="1565924193L" /><meta name="DC.Subject.Keyword" content="stuff" /><meta name="DC.Title" content="CGI Programming with Perl" /><meta content="Text.Monograph" name="DC.Type" /></head><body bgcolor="#ffffff"><img src="gifs/smbanner.gif" alt="Book Home" usemap="#banner-map" border="0" /><map name="banner-map"><area alt="CGI Programming with Perl" href="index.htm" coords="0,0,466,65" shape="rect" /><area alt="Search this book" href="jobjects/fsearch.htm" coords="467,0,514,18" shape="rect" /></map><div class="navbar"><table border="0" width="515"><tr><td width="172" valign="top" align="left"><a href="ch00_07.htm"><img src="../gifs/txtpreva.gif" alt="Previous" border="0" /></a></td><td width="171" valign="top" align="center"><a href="index.htm">CGI Programming with Perl</a></td><td width="172" valign="top" align="right"><a href="ch01_02.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr></table></div><hr align="left" width="515" /><h1 class="chapter">Chapter 1. Getting Started </h1><div class="htmltoc"><h4 class="tochead">Contents:</h4><p><a href="ch01_01.htm">History</a><br><a href="ch01_02.htm">Introduction to CGI</a><br><a href="ch01_03.htm">Alternative Technologies</a><br><a href="ch01_04.htm">Web Server Configuration</a><br></p></div><p>Like the rest of the Internet, the <em class="firstterm">Common GatewayInterface</em><a name="INDEX-1" /> <a name="INDEX-2" />, or <em class="firstterm">CGI</em>, has come a verylong way in a very short time. Just a handful of years ago, CGIscripts were more of a novelty than practical; they were associatedwith hit counters and guestbooks, and were written largely byhobbyists. Today, CGI scripts, written by professional webdevelopers, provide the logic to power much of the vast structure theInternet has become.</p><div class="sect1"><a name="ch01-55491" /><h2 class="sect1">1.1. History</h2><p>Despite the <a name="INDEX-3" /> <a name="INDEX-4" />attentionit now receives, <a name="INDEX-5" /> <a name="INDEX-6" />the Internet is not new. In fact, theprecursor to today's Internet began thirty years ago. TheInternet began its existence as the ARPAnet, which was funded by theUnited States Department of Defense to study networking. The Internetgrew gradually during its first 25 years, and then suddenlyblossomed.</p><p>The Internet has always contained a variety of protocols forexchanging information, but when web browsers such as NCSA Mosaicand, later, Netscape Navigator appeared, they spurred an explosivegrowth. In the last six years, the number of web hosts alone hasgrown from under a thousand to more than ten million. Now, whenpeople hear the term Internet, most think of the Web. Otherprotocols, such as those for email, FTP, chat, and news, certainlyremain popular, but they have become secondary to the Web, as morepeople are using web sites as their gateway to access these otherservices.</p><p>The Web was by no means the first technology available for publishingand exchanging information, but there was something different aboutthe Web that prompted its explosive growth. We'd love to tellyou that CGI was the sole factor for the Web's early growthover protocols like FTP and Gopher. But that wouldn't be true.Probably the real reason the Web gained popularity initially wasbecause it came with pictures. The Web was designed to presentmultiple forms of media: browsers supported inlined images almostfrom the start, and HTML supported rudimentary layout control thatmade information easier to present and read. This control continuedto increase as Netscape added support for new extensions to HTML witheach successive release of the browser.</p><p>Thus initially, the Web grew into a collection of personal home pagesand assorted web sites containing a variety of miscellaneousinformation. However, no one really knew what to<em class="emphasis">do</em> with it, especially businesses. In 1995, acommon refrain in corporations was "Sure the Internet is great,but how many people have actually made money online?" Howquickly things change.</p><a name="ch01-1-fm2xml" /><div class="sect2"><h3 class="sect2">1.1.1. How CGI Is Used Today</h3><p>Today, <a name="INDEX-7" /><a name="INDEX-8" />e-commerce has taken off and dot-comstartups are appearing everywhere. Several technologies have beenfundamental to this progress, and CGI is certainly one of the mostimportant. CGI allows the Web to <em class="emphasis">do</em> things, tobe more than a collection of static resources. A<em class="firstterm">static</em><a name="INDEX-9" /> <a name="INDEX-10" /> resource is somethingthat does not change from request to request, such as an HTML file ora graphic. A <em class="firstterm">dynamic</em> resource is one thatcontains information that may vary with each request, depending onany number of conditions including a changing data source (like adatabase), the identity of the user, or input from the user. Bysupporting dynamic content, CGI allows web servers to provide onlineapplications that users from around the world on various platformscan all access via a standard client: a web browser.</p><p>It is difficult to enumerate all that CGI can do, because it does somuch. If you perform a search on a web site, a CGI application isprobably processing your information. If you fill out a registrationform on the Web, a CGI application is probably processing yourinformation. If you make an online purchase, a CGI application isprobably validating your credit card and logging the transaction. Ifyou view a chart online that dynamically displays informationgraphically, chances are that a CGI application created that chart.Of course, over the last few years other technologies have appearedto handle dynamic tasks like these; we'll look at some of thosein a moment. However, CGI remains the most popular way to do thesetasks and more.</p></div></div><hr align="left" width="515" /><div class="navbar"><table border="0" width="515"><tr><td width="172" valign="top" align="left"><a href="ch00_07.htm"><img src="../gifs/txtpreva.gif" alt="Previous" border="0" /></a></td><td width="171" valign="top" align="center"><a href="index.htm"><img src="../gifs/txthome.gif" alt="Home" border="0" /></a></td><td width="172" valign="top" align="right"><a href="ch01_02.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr><tr><td width="172" valign="top" align="left">0.7. Acknowledgments from the First Edition</td><td width="171" valign="top" align="center"><a href="index/index.htm"><img src="../gifs/index.gif" alt="Book Index" border="0" /></a></td><td width="172" valign="top" align="right">1.2. Introduction to CGI</td></tr></table></div><hr align="left" width="515" /><img src="../gifs/navbar.gif" alt="Library Navigation Links" usemap="#library-map" border="0" /><p><font size="-1"><a href="copyrght.htm">Copyright © 2001</a> O'Reilly & Associates. All rights reserved.</font></p><map name="library-map"><area href="../index.htm" coords="1,1,83,102" shape="rect" /><area href="../lnut/index.htm" coords="81,0,152,95" shape="rect" /><area href="../run/index.htm" coords="172,2,252,105" shape="rect" /><area href="../apache/index.htm" coords="238,2,334,95" shape="rect" /><area href="../sql/index.htm" coords="336,0,412,104" shape="rect" /><area href="../dbi/index.htm" coords="415,0,507,101" shape="rect" /><area href="../cgi/index.htm" coords="511,0,601,99" shape="rect" /></map></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -