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
https://forums.phpfreaks.com/topic/16926-shtml-vs-php-includes/#findComment-71292
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
https://forums.phpfreaks.com/topic/16926-shtml-vs-php-includes/#findComment-71303
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
https://forums.phpfreaks.com/topic/16926-shtml-vs-php-includes/#findComment-71362
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.