2 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/perl
use strict;
use warnings;
$| = 1;
use CGI::Carp qw(fatalsToBrowser); # zeigt Fehler im Browser an
use CGI;
my $cgih = new CGI;
my %vars = $cgih->Vars();
my $filename = "$ENV{HTTP_HOST}.txt";
my ($datum) = localtime;
open (FILE, ">> $filename") or die ("cant open: $!");
flock(FILE, 2 );
print FILE <<_TXT;
ServerName: $ENV{HTTP_HOST}
User_ID: $vars{User_ID}
Description: $datum
Comments: $vars{Comments}
_TXT
close (FILE) or die ("cant close: $!");
open(FILE, "< $filename") or die ("cant open: $!");
my @daten = <FILE>;
close( FILE ) or die ("cant close: $!");
chomp( @daten );
print $cgih->header(),
$cgih->start_html(),
$cgih->p( join $cgih->br(), @daten ),
$cgih->end_html();
1;
2 Einträge, 1 Seite |