httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krist van Besien" <>
Subject Re: [users@httpd] problem with perl script and Apache
Date Mon, 02 Jun 2008 14:31:09 GMT
On Mon, Jun 2, 2008 at 2:44 PM, Octavian Rasnita <> wrote:

> At the beginning of the output generated by your script, you should do:
> print "Content-Type: text/html\n\n";


A minimal script would be:


print "Content-type: text/html\n\n";
print <<HTML;
<p>Hello World</p>

And this would, when executed on the command line, output:

Content-Type: text/html

<p>Hello World</p>

The Content-Type is importan, because it allows your apache server to
know what the script will output. (CGI scripts can produce whatever
you fancy. I have scripts that produce PNGs and SVGs for example...)


Bremgarten b. Bern, Switzerland
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message