Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 25, 2012, 08:15:01 AM

Pages: [1]   Go Down
  Print  
Author Topic: SSI Server Side Includes  (Read 400 times)
GryphonsClaw
Newbie
*
Offline Offline

Posts: 4


WWW
« on: July 31, 2002, 07:42:00 AM »

I have my SSI includes setup in my pages.  <!--#include file="filename" -->  I have tried virtual and the putting the full path, nothing seems to work.  On my machine running IIS I can get the includes to work.  Is there a setting that I need to setup on my control login?

Thanx
Logged
stephan
Guest
« Reply #1 on: July 31, 2002, 10:13:00 PM »

You have to call your page whateveryouwant.shtml
Logged
GryphonsClaw
Newbie
*
Offline Offline

Posts: 4


WWW
« Reply #2 on: August 01, 2002, 01:18:00 AM »

Is there a way to call it .php or .asp instead?
Logged
stephan
Guest
« Reply #3 on: August 01, 2002, 02:25:00 AM »

No, but you can simply use the ASP or PHP scripting languages instead if that's what you want.

You seem to want to include a file, here is how to do it in PHP. For more information visit www.php.net

Make a webpage called something.php

Inside the webpage put this:

<? include  ('yourfile.txt'); ?>

I hope that helps.

If you have any questions, look at www.php.net and then ask in the PHP section in this forum.

There is a thing you can do to make any file extension work as a .shtml file, but it is pointless to do that.

For example, you could have a file called whatever.jdj and put server includes in it, but it is difficult to do and isn't needed anyway.
 
 [ August 01, 2002, 10:29 AM: Message edited by: Stephan ]
Logged
esm
Trekkie
**
Offline Offline

Posts: 17


WWW
« Reply #4 on: August 02, 2002, 08:09:00 AM »

Using virtual it would look something like this from the root ( I don't think you can use http://www.yoursite.com/ahtml/bookmark.txt )
<!--#include virtual="/ahtml/bookmark.txt" -->

The calling file has to be .shtml unless you can use the .htaccess file in which case you can use .html. In the .htaccess file include a line like
 
code:
AddType text/x-server-parsed-html .html

I've seen other versions of this but this works for me.

Finally, if you have "nested" the call to bookmark.txt inside another "include" statement, you must name it bookmark.html instead.
Logged

Gene
The older I get, the more I admire competence, just simple competence, in anything from adultery to zoology
Pages: [1]   Go Up
  Print  
 
Jump to: