Jump to content

Shtml vs PHP Includes


Conjurer

Recommended Posts

php is dynamic - you can use certain information either submitted by a client or drawing database records etc. etc.

shtml and server side includes are simply that. They cant be dynamic like php. the only thing you could do is include certain pages on certain pages but they will always look the same.
Link to comment
Share on other sites

you could use shtml to include something that NEVER changes (unless you alter the file you are including).

use php if you want this particluar element to beable to show different content - content that may change daily or content created randomly from the information you have provided in that file.
Link to comment
Share on other sites

Like bltesar said, it might use fewer system resources. I've defenitely used some servers in the past that are a tad slow with php, and if I was writing something static, i always preferred shtml over includes.

The habit has stayed with me now, and I have a main site logo with a menu that is included() on php pages where I have dynamic stuff going on, but is incorporated with shtml on pages that don't change, like FAQs, LINKS, etc.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.