seb: Datenbank Output wird nicht angezeigt

Beitrag lesen

<code>

#!/usr/bin/perl

use strict;
use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);
use MLDBM qw(DB_File Storable);

our $dbm_file = "/home/seb/blog.db";

our %db;
tie %db, "MLDBM", $dbm_file;

print header();
print start_html(-Title => "Blog");
print "<link href="style.css" rel="stylesheet" type="text/css" media="screen" title="style">\n";
print start_form();

print h1("Blog")."\n";

for(my $i=1; $i <= $db{index}{num}; $i++) {
        print p("$db{$i}{message}")."\n";
        print p("by $db{$i}{user} at $db{$i}{date}")."\n";
}

print end_form();
print end_html();

untie %db;

</code>

<browser ouput>

<!DOCTYPE html
 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
<head>
<title>Blog</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" title="style">
<form method="post" action="/priv/blog.cgi" enctype="multipart/form-data">
<h1>Blog</h1>
</form>
</body>
</html>

</browser output>

<shell output>

Content-Type: text/html; charset=ISO-8859-1

<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
<head>
<title>Blog</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" title="style">
<form method="post" action="" enctype="multipart/form-data">
<h1>Blog</h1>
<p>Hello World!</p>
<p>by seb at 12:43 24.12.2007</p>
</form>
</body>
</html>

</shell output>

Ich weiß nich warum er mir den Datenbankeintrag nicht im Browser anzeigt...

Seb