Forum Moderators: mack

Message Too Old, No Replies

<!--#include virtual problem!

i got problem using this!

         

Roozbeh

9:22 pm on Dec 15, 2003 (gmt 0)

10+ Year Member



Hi

i am newbie in web development and so.....

i finded somewhere a script for counting number of dowloadns and so it said you should put this on your html to show number of downloads

<!--#include virtual="/cgi-bin/ShotGunDisplay.cgi?ammo=yourFile.zip" -->

by running the script it works but this wont work....

i mean if i type
www.mydomainname.com/cgi-bin/ShotGunDisplay.cgi?ammo=yourFile.zip" it works but not in that html....

what should i do...also just renaming a html to shtml is enough for making it work?

pleeker

9:32 pm on Dec 15, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



what should i do...also just renaming a html to shtml is enough for making it work?

Possibly. Check with your web host. Some servers are configured to require .shtml on pages using SSIs.

Welcome to WebmasterWorld.

Roozbeh

10:03 pm on Dec 15, 2003 (gmt 0)

10+ Year Member



what is SSI?

Philosopher

10:07 pm on Dec 15, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



SSI = Server Side Includes

Which is what you are trying to do. Basically, the page is requested, and that little line of code is executed prior to the page being served.

Finally the page is served to the visitor with the output from the executed program included in the page.

You will generally need to have your file extension as .shtml for this to work.

Roozbeh

10:20 pm on Dec 15, 2003 (gmt 0)

10+ Year Member



my page looks like this

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Your File</title>
</head>

<body>
<a href="/weblog/cgi-bin/ShotGun.cgi?ammo=setup34.exe">Your File
<!--#include virtual="/weblog/cgi-bin/ShotGunDisplay.cgi?ammo=setup34.exe" --></a>
</body>

</html>

is anything wrong?
as i said typing /weblog/cgi-bin/ShotGunDisplay.cgi?ammo=setup34.exe works perfect but.....html is not working

Philosopher

10:25 pm on Dec 15, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Change the file extension of your page from .htm or.html or .shtml and see if that fixes it.

Roozbeh

10:38 pm on Dec 15, 2003 (gmt 0)

10+ Year Member



can i you give me a way to test just <--!#include statement?!
maybe i got something wrong somewhere else.
for example any other SSI statement i can test?

Roozbeh

10:41 pm on Dec 15, 2003 (gmt 0)

10+ Year Member



by the way my server is linux...any diffrences?
ie what is that language..is that statement html or...?

Philosopher

10:42 pm on Dec 15, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, when go to the URL the page is located at and do "View/Source" is that statement still there?

If it is, then the server is not executing the statement.

The .shtml file extension basically tells the server to look for statements like the include virtual one etc. and to execute them.

Generally, if the page is just a .html or .htm file extension, the server will NOT execute those statements.

Roozbeh

10:43 pm on Dec 15, 2003 (gmt 0)

10+ Year Member



Wow...by renaming it worked!
thank you