Hi, I have two pages(page1.html and page2.html) on my site that both have an identical section which I will be updating frequently. I want to create a html file(section.html) for that section and include in page1 and page2 so that I will have to modify only 1 file(section.html). I searched the web and I found that this could be done by SSI(Server-Side Includes) such as <!--#include file="section.html" --> Code (markup): And I also learned that I need the server must be enabled for SSI and the file extensions should be .shtml like page1.shtml and page2.shtml. My server seems not to allow SSI and I was wondering if there is another approach for my problem. Thanks.
why don't u try updating your page extensions to .php and then try <?php include(section.php); ?> Code (markup): I think this will surely solve your problem. Regards
in the old days they would use FRAMES. You might want to experiment by practicing with frames. It can be kind of fun to create framesets. From there they used iframes which is a way to seamlessly stitch two or more html pages together and make it look like one page. You can even make a window show up in a middle of a page with different content from another page or another site in. the state of the art these days is to do everything with php, which in truth is not that hard to learn and can be fun to work with. there are lots of tutorials on it around. with php you can do a lot. you can put php into an html document, and you can put html into a php document. If you do this kind of think and you like it you might as well get used to creating all your projects in php rather than html. All browsers pretty much treat them the same. When you create your pages you just save them as *.php
Surely I know the power of PHP and I work with PHP whenever my clients' hosting support PHP. But in this specific case, it doesn't and I need a solution other than PHP. I tried frames but it seems it is not the best option. Thanks for reminding iframes, I never worked with them, now I will try it.
1. try iframe , if that is not what you want. SSI is something just doesn't work that simple in dreamweaver there is a library object that way you can maintain both. or find a server have php and create php includes