Forum Moderators: open
This is driving me crazy. Anybody have any ideas?
Also, try using filename.inc for the include instead of .shtm and see what happens.
Another thing to check is to make sure the included file does NOT contain <html> or <head> or <body> tags.
Does it still mess up for you after these tips? Let us know.
Thanks,
Patrick Elward
If I understand it correctly, the file you want to include has the extension .shtm, but you're trying to include it into a .htm or .html file?
If this is the case, you've got things the wrong way round - the file into which you want to place the include should have the extension .shtm, and the included file can have any extension you like.
That is correct - the include file has the .shtm extension. Thanks for pointing out that mistake. I'll make the change, but I also have tried using the .inc extension for the include (.htm for whole the page) and the include html did not show up, but perhaps that was related to a different problem. The include does not contain any <html><head> or <body> tags, just a table.
(.htm for whole the page)
If the whole page has the extension .htm, then you need .htm files to be parsed for SSI, not .shtm. If you are using includes only occasionally, you'd be better renameing the page to .shtm and leaving other pages which don't use includes as .htm.
The include does not contain any <html><head> or <body> tags, just a table.
That's correct - it's how it should be.
The include is in every page (i.e. alot of them). Some pages are in the root some in other folders. In my include html I reference some images. I can't find a way to make the image path change to adjust for different locations of different pages. Is there a way to do this? Do I have to have an absolute path?