resp协议定义, xml定义配置文件
This commit is contained in:
20
NtyCo/htdocs/check.cgi
Normal file
20
NtyCo/htdocs/check.cgi
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/perl -Tw
|
||||
|
||||
use strict;
|
||||
use CGI;
|
||||
|
||||
my($cgi) = new CGI;
|
||||
|
||||
print $cgi->header('text/html');
|
||||
print $cgi->start_html(-title => "Example CGI script",
|
||||
-BGCOLOR => 'red');
|
||||
print $cgi->h1("CGI Example");
|
||||
print $cgi->p, "This is an example of CGI\n";
|
||||
print $cgi->p, "Parameters given to this script:\n";
|
||||
print "<UL>\n";
|
||||
foreach my $param ($cgi->param)
|
||||
{
|
||||
print "<LI>", "$param ", $cgi->param($param), "\n";
|
||||
}
|
||||
print "</UL>";
|
||||
print $cgi->end_html, "\n";
|
||||
15
NtyCo/htdocs/color.cgi
Normal file
15
NtyCo/htdocs/color.cgi
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/perl -Tw
|
||||
|
||||
use strict;
|
||||
use CGI;
|
||||
|
||||
my($cgi) = new CGI;
|
||||
|
||||
print $cgi->header;
|
||||
my($color) = "blue";
|
||||
$color = $cgi->param('color') if defined $cgi->param('color');
|
||||
|
||||
print $cgi->start_html(-title => uc($color),
|
||||
-BGCOLOR => $color);
|
||||
print $cgi->h1("This is $color");
|
||||
print $cgi->end_html;
|
||||
11
NtyCo/htdocs/index.html
Normal file
11
NtyCo/htdocs/index.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<HTML>
|
||||
<TITLE>Index</TITLE>
|
||||
<BODY>
|
||||
<P>Welcome to J. David's webserver.
|
||||
<H1>CGI demo
|
||||
<FORM ACTION="color.cgi" METHOD="POST">
|
||||
Enter a color: <INPUT TYPE="text" NAME="color">
|
||||
<INPUT TYPE="submit">
|
||||
</FORM>
|
||||
</BODY>
|
||||
</HTML>
|
||||
Reference in New Issue
Block a user