⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 day3_2.html

📁 《Perl CGI 6天入门》
💻 HTML
字号:
<html>
<!-- #BeginTemplate "/Templates/backend.dwt" -->

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">

<!--

a:link {  color: blue; text-decoration: none}

a:visited {  color: purple; text-decoration: none}

a:hover {  color: #CC0033; text-decoration: underline}

.smallfont {  font-family: "宋体"; font-size: 9pt; line-height: 12pt}

-->

</style>
<!-- #BeginEditable "doctitle" -->
<title>CGI入门教程</title>
<!-- #EndEditable -->
</head>

<body topmargin="1" leftmargin="2">

<p><b> </b></p>

<p><span class="smallfont"><b>CGI入门教程<br>
</b><br>
<font color="#FF0000">第一页</font> <a href="day3_1.html">回应脚本</a><br>
<font color="#FF0000">第二页</font> 脚本解释<br>
<font color="#FF0000">第三页</font> <a href="day3_3.html">BODY部分</a></span></p>

<p><span class="smallfont">[<a href="day1_1.html">第1天</a>][<a href="day2_1.html">第2天</a>][第3天][<a
href="day4_1.html">第4天</a>][<a href="day5_1.html">第5天</a>][<a href="day6_1.html">第6天</a>][<a
href="../perl.htm">返回</a>]</span></p>

<p><span class="smallfont"><b>第二页:脚本解释</b></span></p>

<p><span class="smallfont">现在让我们看看这段代码。</span></p>

<p><span class="smallfont">#!/usr/local/bin/perl <br>
# <br>
&amp;readparse; <br>
print &quot;Content-type: text/html\n\n&quot;; </span></p>

<p><span class="smallfont">#*****************BEGIN BODY************* <br>
</span></p>

<hr WIDTH="100%">

<p><span class="smallfont">Unix上的每个CGI的第一行都是运行它的程序的路径。记住,你的可能与上面写的不同。服务器将按这个路径定位Perl,然后用Perl解释器执行程序。这是唯一的有#并且对程序有意义的一行。</span></p>

<p><span class="smallfont">程序其余部分的#只是注释,程序将忽略其后的内容。</span></p>

<p><span class="smallfont">第三行是一个命令,&amp;readparse;。这是一个子过程,输入所有进入HTML 
FORM中的文本。第四行对所有CGI都是必须的,它告诉服务器我们要打印的任何信息都应该返回HTML文档。</span></p>

<p><span class="smallfont">这些行永远不会改变,因此下面我们集中在BODY部分的内容上。<a
href="day3_3.html">&gt;&gt;</a></span></p>
</body>
<!-- #EndTemplate -->
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -