Leser: 2
|< 1 2 >| | 13 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
#!/usr/bin/perl
use strict;
read(STDIN, $Daten,, $ENV{'CONTENT_LENGTH'});
print "Content-type: text/html\n\n";
print "<html><head><title>CGI-Reaktion</title></head>\n";
print "<body><h1>Reaktion des CGI-Programms</h1>\n";
print $ENV['CONTENT_LENGT&H'};
print "</body></html>\n";
1
2
3
4
5
6
7
8
<html><head><title>test1.html</title></head>
<body>
<h1>Testformular</h1>
<form action="/cgi-bin/test1.pl" method=post>
Name: <input size=40 maxlength=40 name="Anwendername""><br>
Text: <textarea rows=5 cols=70 name="Kommentartext" wrap=virtual></textarea><p>
<input type=submit value="Absenden">
</form></body></html>
1
2
3
4
5
6
7
8
9
#!/usr/bin/perl
use strict;
use warnings;
read(STDIN, my $Daten, $ENV{'CONTENT_LENGTH'});
print "Content-type: text/html\n\n";
print "<html><head><title>CGI-Reaktion</title></head>\n";
print "<body><h1>Reaktion des CGI-Programms</h1>\n";
print $ENV{'CONTENT_LENGTH'};
print "</body></html>\n";
1
2
3
4
5
6
7
8
# CGI directory exists, if you have that configured.
#
<Directory "/srv/www/cgi-bin">
AllowOverride None
Options +ExecCGI -Includes
Order allow,deny
Allow from all
</Directory>
QuoteDas muss in der httpd.conf vom Apachen eingestellt werden...
1
2
3
4
5
use CGI qw/:standard/;
use CGI::Carp qw(fatalsToBrowser);
my $name=param('Anwendername');
print $name if (defined $name);
|< 1 2 >| | 13 Einträge, 2 Seiten |