Thread Auselesen (10 answers)
Opened by haijp at 2006-04-28 13:21

renee
 2006-04-28 14:38
#7455 #7455
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Deine comments.pl müsste dann ungefähr so aussehen:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl

use strict;
use warnings;
use CGI;
use CGI::Carp qw(fatalsToBrowser);

my $cgi = CGI->new();
print $cgi->header();

my $linkfile = '/path/to/file.links';

my $url = $cgi->param('AnwenderName');
my $text = $cgi->param('Kommentartext');

$text =~ s/\r?\n/<br>/sg;

open(my $fh,">>",$linkfile) or die $!;
print $fh $url,"\n",$text,"\n";
close $fh or die $!;

print $cgi->b('Link wurde eingetragen');
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread Auselesen