Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using SSI in .txt files that are in the cgi-bin 2

Status
Not open for further replies.

JennyW

Technical User
Mar 1, 2001
323
CA
Hi,

I have a mailing list, it has several pages.

All of its contents are in the cgi-bin.

Inside the cgi-bin are some header and footer .txt files. In those files I can add a template that can be used/called by all the mailing list’s pages (there are several cgi generated pages).

I want to call a template using SSI.

I used this SSI code in a .txt file within the cgi-bin, but I received no results:

<!--#include virtual=&quot;../scripts/ssi/template.txt&quot; -->

I know I have the correct path to the template.


Does anyone have any ideas what I did wrong?


Thanks,
Jenny :)
 
Hi Jenny,

If I'm right you can't specify ../ if you use &quot;include virtual&quot; You can only specify this if you use &quot;include file&quot; I use ASP so I don't know if that also rules for cgi-bin?

So try:
<!--#include virtual=&quot;/scripts/ssi/template.txt&quot; -->

or
<!--#include file=&quot;../scripts/ssi/template.txt&quot; -->

Include file is relative to the path of the directory that contains the including file.
Remember that if you don't use the ../ in &quot;include file&quot; that your path can NOT start with a /

Hope this helps,
Erik <!-- My sport: Boomerang throwing !!
This year I will participate at the World Championships in Germany. (!! Many Happy Returns !! -->
 
Hi again Boomer!

Actually all of my ‘include virtual’ calls start with a ../
I think you have it the other way around. As far as I know you can’t use ../ with ‘include file’. I read that ‘include file’ only looks for the file in the directory you’re currently in.

Anyway, I tried your idea…

<!--#include virtual=&quot;/scripts/ssi/template.txt&quot; -->

…but was unsuccessful.

Is it possible to use SSI in .txt files that are in the cgi-bin?

Thanks,
Jenny
 
yes, the cgi-bin is just another directory.
BobbaFet

Everyone has a right to my opinion.
E-mail me at caswegkamp@hotmail.com

Heineken is like making love in a cano... it's f*cking close to water !!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top