apw
02-04-2009, 05:08 AM
hello all, i'm new at cgi-perl. i'm trying to write script on cgi/perl. the syntax is very common hello world :
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "<html><head><title>test</head></title>\n";
print "<body>\n";
print "<h1>Welcome...</h1>\n";
print "</body></html>\n";
i save the file to /var/www/html/test1.cgi
when i try to show at browser by typing "http://localhost/test1.cgi" the browser shows :
Content-type: text/html\n\n
<html><head><title>test</head></title>\n
<body>\n
<h1>Welcome...</h1>\n
</body></html>\n
why can't i get the right result of html page ?? can anyone help me please, so confuse..http://www.webdeveloper.com/forum/images/smilies/confused.gif
i'm using fedora 4/redhat 9 os, i've set execCGI under /etc/httpd/conf.d at <directory /var/www/cgi-bin..:confused::confused:
thankyou all..
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "<html><head><title>test</head></title>\n";
print "<body>\n";
print "<h1>Welcome...</h1>\n";
print "</body></html>\n";
i save the file to /var/www/html/test1.cgi
when i try to show at browser by typing "http://localhost/test1.cgi" the browser shows :
Content-type: text/html\n\n
<html><head><title>test</head></title>\n
<body>\n
<h1>Welcome...</h1>\n
</body></html>\n
why can't i get the right result of html page ?? can anyone help me please, so confuse..http://www.webdeveloper.com/forum/images/smilies/confused.gif
i'm using fedora 4/redhat 9 os, i've set execCGI under /etc/httpd/conf.d at <directory /var/www/cgi-bin..:confused::confused:
thankyou all..