Hi,
I read a lot of the posts below about calling other CGI scripts from within HTML.pl, but I still need help. I saw someone else had this problem, but they didn't seem to find the help they needed, so hopefully I can find it for the both of us.
I stuck this sub routine into db.cgi:
open(FILE, "../news/display.cgi") or die("Couldn't open the file.");
@lines = <FILE>;
close(FILE);
foreach $line (@lines) {
print $line;
}
}
(my news CGI is at ../news/display.cgi)
I also stuck this into HTML.pl:
&insert_news;
print qq|
Instead of showing the news like as if I was to call it with exec cgi SSI from a .shtml document, it printed out each line of code in display.cgi.
How can I get display.cgi to appear in my HTML output as it would if I was to use a tag like this in a .shtml doc?
Do you get what I'm saying? If you could help me, I'd appreciate it greatly.
Thanks.
[This message has been edited by Gliebster (edited October 08, 1999).]
I read a lot of the posts below about calling other CGI scripts from within HTML.pl, but I still need help. I saw someone else had this problem, but they didn't seem to find the help they needed, so hopefully I can find it for the both of us.
I stuck this sub routine into db.cgi:
Code:
sub insert_news { open(FILE, "../news/display.cgi") or die("Couldn't open the file.");
@lines = <FILE>;
close(FILE);
foreach $line (@lines) {
print $line;
}
}
(my news CGI is at ../news/display.cgi)
I also stuck this into HTML.pl:
Code:
|; &insert_news;
print qq|
Instead of showing the news like as if I was to call it with exec cgi SSI from a .shtml document, it printed out each line of code in display.cgi.
How can I get display.cgi to appear in my HTML output as it would if I was to use a tag like this in a .shtml doc?
Code:
<!--#exec cgi="../news/display.cgi" -->Do you get what I'm saying? If you could help me, I'd appreciate it greatly.
Thanks.
[This message has been edited by Gliebster (edited October 08, 1999).]