July 27th, 2000, 02:40 PM
I am trying to use SSI (for the first time)
to display the contents of a file within an html form. For ex: a user views the form
and the current date is already filled in for them ( I know how to do that: <!--#config timefmt="%Y-%m-%d" --> <!--#echo var="DATE_LOCAL" --> )
I want to display the contents of my counter file within the job id field the user fills out. I tried : "<!--#echo var="../cgi-bin/data/counter.pl" -->" but it doesn't work.
The main goal is to give the user a predefined job number and I was using the counter to do that but it's not working..any suggestions?
July 27th, 2000, 04:20 PM
you can insert the output of a script with :
<!--#include virtual="scriptname.ext" -->
July 27th, 2000, 05:01 PM
Yes, use <!--#include virtual="scriptname.ext" -->
>>"<!--#echo var="../cgi-bin/data/counter.pl" -->" but it doesn't work
Two mistakes here. First, you can't use echo var for that. Second, you can't use "../", that is for security reason and it's how SSI supposed to work. Please note, you also can't include up 1 directory level. To do that, you have to use "exec cmd" with full path.
July 28th, 2000, 01:54 PM
I tried that and received the following error.. any ideas why??
[Can't write to the data file! Counter not incremented!]8
July 28th, 2000, 02:34 PM
Nevermind, I got it to work..my brain must think it's Monday :-). Thanks again!
August 22nd, 2000, 08:49 AM
I have tried to use the include virtual ssi but it displays all of the coding for the cgi file instead of executing it. i am also trying to pass a parameter and it says it can't find the .html file that the script looks for as a template file. I have run this script using exec cgi on a different server but me new ISP won't run this ssi command. Any suggestions on what the problem might be?