homepage Welcome to WebmasterWorld Guest from 54.242.200.172
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Accredited PayPal World Seller

Home / Forums Index / WebmasterWorld / Webmaster General
Forum Library, Charter, Moderators: phranque & physics

Webmaster General Forum

    
SSI and index page
Meat Curtian




msg:3748006
 4:10 pm on Sep 19, 2008 (gmt 0)

Hey all,
I'm trying to include a SSI on my index page. A very basic include in the form of:

<!--#include file="inc/PlatinumTopText.inc" -->

This include works fine in pages off the root (www.xyz.com/test.htm), but on the index.htm page(www.xyz.com), this include does not seem to work.

What am I missing here? The page works fine when I preview the page in DreamWeaver, but when I upload the page to my server, and try to display the page, the include is blank, not showing at all.

What is causing the include not to work on my index page?

?!?

Thanks in advance,

Factor

 

The Contractor




msg:3748018
 4:21 pm on Sep 19, 2008 (gmt 0)

Did you try:
<!--#include virtual="inc/PlatinumTopText.inc" -->

or

<!--#include virtual="/inc/PlatinumTopText.inc" -->

Meat Curtian




msg:3748039
 4:38 pm on Sep 19, 2008 (gmt 0)

Hi,
thanks for your input...

I tried both your suggestions, and still the include is not displaying correctly....

Factor

Meat Curtian




msg:3748107
 5:55 pm on Sep 19, 2008 (gmt 0)

On another site, I am having problems with 'sub' pages. I get the following error message:
[an error occurred while processing this directive]

Our .htaccess file is as follows:
AddType application/x-httpd-php .htm .html
AddHandler server-parsed .shtml .html
AddType text/x-server-parsed-html .shtml

Any ideas?

The Contractor




msg:3748534
 1:53 pm on Sep 20, 2008 (gmt 0)

AddHandler server-parsed .shtml .html

You do NOT have .htm extensions listed and if you are trying to call from index.htm it will NOT work. You cannot call .htm and .html pages as being PHP AND server-parsed. Meaning simply any extension being parsed as PHP cannot also be server-parsed - it's one or the other. If you are parsing .htm/.html as PHP pages you will have to use the following from your example.

<?php include $_SERVER['DOCUMENT_ROOT'].'/inc/PlatinumTopText.inc.php'; ?>

or if all the files are in the root calling the includes you could use:

<?php include("inc/PlatinumTopText.inc"); ?>

DaveLite




msg:3751106
 12:40 pm on Sep 24, 2008 (gmt 0)

It's sounds like it's all relative to me.

Try adding the slash to the front of the relative address. "/yoursite/folder/includethis.htm" (as recommended by another post)

If that doesn't work, ad one dot. "./yoursite/folder/includethis.htm"

If no luck, try two dots. "../yoursite/folder/includethis.htm"

Last chance for my advice is add the last dot. ".../yoursite/folder/includethis.htm"

As long as you know that your SSI is working in other folders off the root, it really sounds like it's relative to me.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Webmaster General
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved