Thursday, August 17, 2006

Perl script on cgiwrap

If I use some script like this

#!/usr/bin/perl
print "Hello World!";

It will give me error :
[Wed Aug 16 08:57:50 2006] [error] [client 222.209.97.197] malformed header from script. Bad header=Hello World...: /www/cgiwrap/cgi/cgiwrap

And I must do like this:

#!/usr/bin/perl
use CGI qw(:standard);
print header('Welcome to my home page!');
print start_html(), "Linux and PHP", end_html();

No comments:

Post a Comment