Forum Moderators: coopster & phranque

Message Too Old, No Replies

Include within CGI Script, please help

         

Acternaweb

1:55 pm on Oct 26, 2001 (gmt 0)

10+ Year Member



I have several includes that run fine on my static html pages, but once I put the code on cgi scripts, the includes do not appear. The cgi-bin has the same htaccess as the html docs.

The includes are a breadcrumb script and a time/date script, nothing to fancy

Any ideas? I can post the pages, if that will help.

Thanks,

mark_roach

2:10 pm on Oct 26, 2001 (gmt 0)

10+ Year Member



Acternaweb, are you talking about SSI includes ?

The SSI includes will not be parsed if you have used a cgi to generate them. You will need to amend your CGI to read the contents of your include files or run the scripts directly.

volatilegx

1:04 am on Oct 31, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Acternaweb,

Why not just put the functionality of the include statements directly into your cgi script?

supernat

7:31 pm on Nov 3, 2001 (gmt 0)



1) You can copy the code directly from the 2 included scripts and place them in the single script. This would work and be most efficient.

2) You can execute those scripts from the cgi script with input/output parameters, then print the output inside the first script, I think...though I haven't tried this because the first way is so much easier. :)

Good luck.