- Post ID 202892
I have some html code that runs ok, but want to put it into an include file. It executes in the shtml file, but does nothing in the include file. I have not done this, any one have any examples or what I need in the include file to make it work. I need help please.
Are you trying to do a java script include?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
By the looks of it, you are trying to use SSI.
The rule of thumb is:
If the file to be included is in the same folder as the file that calls it, you use
If, however, the included file is in another folder, the syntax is
The 'included.html' can also be a .txt file. I used to have the 'main file', the one that calls the includes, as a .shtml file, but it may be possible to use just .html, it depends on your server.
Of course you will have to upload the files in order to test them, unless you have wamp, xamp, winamp or one of these server packets installed.
SSI is actually a pretty old way of including content from one file into another, nowadays php includes are more common.
The rule of thumb is:
If the file to be included is in the same folder as the file that calls it, you use
<!--#include file="included.html" -->
If, however, the included file is in another folder, the syntax is
<!--#include virtual="/directory/included.html" -->
The 'included.html' can also be a .txt file. I used to have the 'main file', the one that calls the includes, as a .shtml file, but it may be possible to use just .html, it depends on your server.
Of course you will have to upload the files in order to test them, unless you have wamp, xamp, winamp or one of these server packets installed.
SSI is actually a pretty old way of including content from one file into another, nowadays php includes are more common.
Ha en riktig god dag!
Inger, Norway
My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com
Inger, Norway
My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.