Shtml vs PHP Includes
Posted 08 August 2006 - 06:22 PM
If you have access to php on your hosting site when and why would it make since to use an shtml include instead of a PHP include?
Posted 08 August 2006 - 06:33 PM
Obviously, a only a PHP include can have PHP code and dynamically generated content, but if only static HTML is needed, perhaps the shtml include is faster and uses less server resources.
Posted 08 August 2006 - 06:37 PM
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.
Posted 08 August 2006 - 06:40 PM
Are there any situations where an SHTML include would be preferred to PHP - given your server can process both?
Posted 08 August 2006 - 06:57 PM
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.
Posted 08 August 2006 - 07:06 PM
Posted 08 August 2006 - 08:07 PM
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.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users