The line I listed above is what I use to include existing cgi scripts (like my banner rotator) that I want to 'insert' into a secondary script (like my message board). That way I don't have to cut and paste the code into that spot... and if I change the original code, it automatically changes in the second script.
1-On-1 Free Basketball Game - Wanna Play? http://basketball-game.com/
Thousands of Players around the World compete weekly!
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.
John Slade posted this at 17:10 — 12th July 1999.
They have: 15 posts
Joined: Mar 1999
It is not possible to use the include and exec tags in a CGI script but it is possible to emulate what SSI does when a Perl script is executed.
----------
John Slade (ICQ #19533369)
http://www.grandprix1.com - Everything for Microprose F1GP
Anonymous posted this at 01:33 — 13th July 1999.
They have: 5,633 posts
Joined: Jan 1970
You can, actually ....
Instead of printing text/html headers, print wwwserver/html-ssi. That should do the trick (at least in my Win 95 machine)
Cheers,
Federico
----------
UBBdir.com -- Find the internet's best forums
WDresources.com -- Resources for the web developer
JP Stones posted this at 01:34 — 13th July 1999.
They have: 2,390 posts
Joined: Nov 1998
SSI in CGI scripts is not possible to my knowledge
JP
----------
The Webmaster Promotion and Resource Center.
http://www.what-next.com
Voltec posted this at 01:27 — 17th July 1999.
They have: 220 posts
Joined: May 1999
I use 'Require' to insert a file into a cgi script.
Example:
require "../burst-sub.cgi";
There are two limitations that I have noted:
1) The script MUST return a True or 1 value at the end or it will add an entry to your error logs. (simple to do: $result = 1; as the last line)
2) You can only 'include' this file in any cgi file ONCE... the reason is simple - it has already been included.
I don't know if this is not 'standard'... but I know it works... I use it often.
Matt
----------
1-On-1 Free Basketball Game - Wanna Play?
http://basketball-game.com
1-On-1 Free Basketball Game - Wanna Play?
http://basketball-game.com/
Thousands of Players around the World compete weekly!
John Slade posted this at 19:36 — 17th July 1999.
They have: 15 posts
Joined: Mar 1999
I use
Include Tag:-
open (FILE, "file.txt") ;
while (<FILE>) { print $_; }
close (FILE);
Exec tag:-
$ssiexec = `file.cgi` ;
$ssiexec =~ s!Content-type: \w+/\w+!!i ;
print "$ssiexec" ;
----------
John Slade (ICQ #19533369)
http://www.grandprix1.com - Everything for Microprose F1GP
Voltec posted this at 00:39 — 19th July 1999.
They have: 220 posts
Joined: May 1999
The line I listed above is what I use to include existing cgi scripts (like my banner rotator) that I want to 'insert' into a secondary script (like my message board). That way I don't have to cut and paste the code into that spot... and if I change the original code, it automatically changes in the second script.
Matt
----------
1-On-1 Free Basketball Game - Wanna Play?
http://basketball-game.com
1-On-1 Free Basketball Game - Wanna Play?
http://basketball-game.com/
Thousands of Players around the World compete weekly!
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.