How to embedd cgi in html
Posted
by neversaint
on Stack Overflow
See other posts from Stack Overflow
or by neversaint
Published on 2010-04-23T04:35:46Z
Indexed on
2010/04/23
4:43 UTC
Read the original article
Hit count: 424
I have no problem executing a cgi file under the normal url like this:
http://www.myhost.com/mydir/cgi-bin/test.cgi
However when I tried to embedd it into HTML file (called index.html
) like this:
<HTML>
<BODY>
<P>Here's the output from my program:
<FORM ACTION="/var/www/mydir/cgi-bin/test.cgi" METHOD=POST>
</FORM>
</P>
</BODY>
</HTML>
The CGI doesn't get executed when I do:
http://www.myhost.com/mydir/index.html
The CGI file (test.cgi
) simply looks like this:
#!/usr/bin/perl -wT
use CGI::Carp qw(fatalsToBrowser);
print "Test cgi!\n";
What's the right way to do it?
© Stack Overflow or respective owner