Forum Moderators: phranque
<!--#include virtual="cgi-bin/show_time.pl" -->
and it doesnt work .. nothing shows up at all , what do i need to do to be able to execute it that way , if i execute it alone , using url/cgi-bin/show_time.pl, it works fine..
I think by default, IIS5 will only include fileB into pageA
if pageA is named .asp or .shtml unless it's specifically setup otherwise.
Try creating a blank page and including another file to see if that works first.
If you don't know about virtual directories and such and don't want to do that, you can use ".. file=" instead of ".. virtual=" to access another directory directly. That works fine, if, in your example, cgi-bin is a sub directory of the directory your asp code is in. More likely, though, it is a "sister directory", in which case you can use "... file="../cgi-bin..." in the obvious way, but, to do this, you must enable parent paths through internet services management (in Home Directory >> Configuration >> App Options).
I don't think the issue is the file type. We have included filenames with many different file extensions without any problems.
ok well how would i go about running a pl to just display on my page ?
You just call it directly as a URL:
[yoursite.com...]
that's all you need.
3. Creating the HTML.
- The following line of code will tell the Web Server to include the output of
the script in the HTML. Assuming that "cgi-bin/show_time.pl" is the correct
path to the script.
<!--#include virtual="cgi-bin/show_time.pl" -->
, now ive got it so far as to it displays the contents of the show time pl , but not execute it and actually proccess the script heh .. so your saying there is no way i can use it ?
it displays the contents of the show time pl
I don't know for sure that you can't execute it within your web page, but the "include" statement is working correctly. The purpose of the "include" statement is to bring in code from an external file, which it sounds like it is doing.
If all you want to do is show the time you'd be better off doing it in Javascript or VBscript, both of which can run client side.
I don't know for sure that you can't execute it within your web page, but the "include" statement is working correctly. The purpose of the "include" statement is to bring in code from an external file, which it sounds like it is doing.If all you want to do is show the time you'd be better off doing it in Javascript or VBscript, both of which can run client side.
Can you run perl scripts by calling them directly and not using the SSI stuff?
If you script is being printed to the screen instead of being executed, then I think that you mean that you don't have your .pl scripts mapped to perl on your system.
Either that or your headers are wrong in the script.
Do you have
print "Content-type: text/html\n\n"; in the script?
See this guide [perl.xotechnologies.net ] for detailed instructions on how to do it.
Or, if you have already done that, maybe you need to use code like:
<!-- #EXEC CGI="/cgi-bin/show_time.pl" -->
I think the include statement you are using just 'includes' that information into the file that is calling it, but doesn't execute it.
see the microsoft support page on iis and ssi [support.microsoft.com] for more information.