Howdy Folks!...got a question?...how can one call a SSI from within dbman script...I have checked how Webadverts does it but that technique seems to work only with the Webadvert script...anyone got any ideas?...thanks.. still a Novice...Rob
May 31, 1999, 3:02 PM
User (429 posts)
May 31, 1999, 3:02 PM
Post #2 of 2
Views: 509
Basically you don't, you have to simulate it with a subroutine that does the same thing. For example, to simulate a file include, you would need a subroutine like this:
sub include_file {
open(FILE, "/path/to/file.ext") or die("Couldn't open the file.");
@lines = <FILE>;
close(FILE);
foreach $line (@lines) {
print $line;
}
}
And where you would normally put the SSI call in the HTML output, you would now put:
&include_file;
...making sure you close off any print statements first.
Cheers,
adam
sub include_file {
open(FILE, "/path/to/file.ext") or die("Couldn't open the file.");
@lines = <FILE>;
close(FILE);
foreach $line (@lines) {
print $line;
}
}
And where you would normally put the SSI call in the HTML output, you would now put:
&include_file;
...making sure you close off any print statements first.
Cheers,
adam

