J
jch
I'm trying to learn about using CGI scripts. I've written a very basic PERL
cgi called test.pl:
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Hello - IT WORKS!!\n";
I can invoke this CGI and get the proper reults from a web page using:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<a href="/cgi-bin/test.pl">Click</a>
</body>
</html>
I can also run the CGI directly using: www.mysite.com/cgi-bin/test.pl
What I really want to do is invoke the CGI from a web page without the user
having to click on anything. Ex: display the current date on a page. How
should I do this? I've tried a SSI but this doesn't work:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<!-- #include virtual="/cgi-bin/test.pl" -->
</body>
</html>
Sorry for the basic question. I've done a lot of Googling and haven't found
the answer. Thank you.
cgi called test.pl:
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Hello - IT WORKS!!\n";
I can invoke this CGI and get the proper reults from a web page using:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<a href="/cgi-bin/test.pl">Click</a>
</body>
</html>
I can also run the CGI directly using: www.mysite.com/cgi-bin/test.pl
What I really want to do is invoke the CGI from a web page without the user
having to click on anything. Ex: display the current date on a page. How
should I do this? I've tried a SSI but this doesn't work:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<!-- #include virtual="/cgi-bin/test.pl" -->
</body>
</html>
Sorry for the basic question. I've done a lot of Googling and haven't found
the answer. Thank you.