View Full Version : Include HTML file in another HTML file

07-31-2007, 11:50 PM
I know this sounds super easy at first, but hear me out. Mostly because I've never set up a website through a hosting service before (only developed on an apache/tomcat server of my own) and am not sure if the server-side include work once it's being hosted regardless of whether or not it works from opening the file up with the web browser? I would set up the server that comes with windows, but I'm mostly developing on work computer that won't allow me to add/remove windows components. Any suggestions?

08-01-2007, 12:04 AM
So wait you are trying this on a web host or on your local computer? Either way you need a server of some kind. Its just more likely that you web host would support SSI or PHP includes.

08-01-2007, 12:04 AM

08-01-2007, 07:30 AM
if you're on a web host SSI or PHP includes would be your best options.

I think PHP includes are more useful in the long run. But depends on what purpose...

08-01-2007, 12:10 PM
If the server has PHP installed, I see no reason to use SSI. Why use two languages when you can use one.

08-01-2007, 04:29 PM
I'm not using a server at all right now. It's simply on my work computer. Is there a way to make an include to a webpage that isn't invoked on the server side?

08-01-2007, 04:37 PM
The only method I can think of without serverside ARE iframes. However those get messy sometimes - and are frowned upon.

You can easily emulate a server environment on your computer. XAMMP (http://www.apachefriends.org/en/xampp.html), WAMP (http://www.wampserver.com/en/) and Apache (http://www.apache.org/) (though you have to install all the modules yourself for the Apache Server). XAMMP is my personal favorite.

08-01-2007, 04:47 PM
<object> (http://www.w3.org/TR/html4/struct/objects.html#h-13.3) anyone?