Thread hilfe bei tabellen erstellung: brauche hilfe bei tabellen erstellung (19 answers)
Opened by Gast at 2006-07-27 16:33

junglist
 2006-07-27 18:45
#8477 #8477
User since
2006-07-27
7 Artikel
BenutzerIn
[default_avatar]
so habe mal ein test template erstellt es kommt aber serverfehler error 500
was habe ich gemacht in das hauptscript habe ich
use HTML::Template;
require "awardtmpl.tmpl";
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
################################################################################
#
#
#
#
# AWARD TABLE NEW
#
$img2 = "img/award_$award2" . "_$level2" . "_small.jpg";

$name2 = $awardname{$award2}[$level2];

$desc2 = $awarddesc{$award2}[$level2];
print Content-type:"text/html\n\n";
my $tamplate = HTML::Template->new(filename->'./awardtmpl.tmpl');
my $AWARDTABLE = [{AWARD => '$img', NAME => '$name', DESC => '$desc'}]
$template->param(AWARDTABLE=$AWARDTABLE);
print $template->output();

eingefügt
und meine awardtmpl.tmpl
sieht so aus
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<body>
<table width="200" border="1">
<!--TMPL_LOOP NAME=AWARDTABLE -->
<tr>
<td><!-- TMPL_VAR AWARD=AWARD --></td>
<td><!-- TMPL_VAR NAME=NAME --></td>
<td><!-- TMPL_VAR DESC=DESC --></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>

</body>

in meinen Server error log steht
[Thu Jul 27 18:39:40 2006] [error] [client 192.168.*.*] Can't locate HTML/Template.pm in @INC (@INC contains: /usr/lib/perl5/5.8.7/i586-linux-thread-multi /usr/lib/perl5/5.8.7 /usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.7/i586-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl .) at /srv/www/htdocs/**/script.cgi line 4.
[Thu Jul 27 18:39:40 2006] [error] [client 192.168.*.*] BEGIN failed--compilation aborted at /srv/www/htdocs/**/script.cgi line 4.
[Thu Jul 27 18:39:40 2006] [error] [client 192.168.*.*] Premature end of script headers: script.cgi
muss ich das Modul vieleicht noch installieren oder ist es ein fehler im script?\n\n

<!--EDIT|junglist|1154011617-->

View full thread hilfe bei tabellen erstellung: brauche hilfe bei tabellen erstellung