Forum Moderators: open

Message Too Old, No Replies

Using shtml for page includes

         

kiwidesign

11:41 pm on Apr 12, 2006 (gmt 0)

10+ Year Member



Hi I am working on a project that will have a flash header and generally static content and a footer that is the same across all pages. Originally I made php pages and included the header and footer.

Then I found out that shtml pages can include other pages in them - so i thought i'd try them.

Can anyone tell me if there are any serious issues with using shtml or what the general feeling is towards using them.

Regards,
Kiwidesign

doodlebee

4:45 pm on Apr 14, 2006 (gmt 0)

10+ Year Member



I've used shtml before - not a problem. Works pretty much along the same lines as PHP includes. However, you need to be sure your webhost will show the shtml includes. I have yet to do a website where the host *does* automatically allow this. I usually have to edit my .htaccess file to allow the shtml includes - it's only a few lines of code, and not a big deal. But they work just fine once you get that in there.

encyclo

5:47 pm on Apr 14, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you can use PHP includes, then there is no real advantage in switching to SSI (server-side includes). SSI is much more limited than PHP, and the speed of modern servers means that (in particular for very simple operations like including files) there is no significant difference in speed or server load between the two methods. I would stick with PHP.

doodlebee

1:59 pm on Apr 16, 2006 (gmt 0)

10+ Year Member



I do agree with encyclo there - I'd much ratehr use PHP than .shtml any day. Unfortunately, there are occassions when you don't have a choice. But if you *do* have one, definitely stick with PHP.

kiwidesign

11:28 pm on Apr 17, 2006 (gmt 0)

10+ Year Member



Hi all,

Thanks for the advice. What I have ended up doing is using php and then using <? @include($page);?> to load the main content.

Cheers
Kiwidesign