17

What is the difference between:

HTML
SHTML
PHTML

Why and when i'll use which one?

A.N.M. Saiful Islam
  • 2,118
  • 5
  • 28
  • 34
  • Could you add some links to point to what you're referring to? HTML is clear enough, but SHTML and PHTML may need further clarification so we know what you're talking about. – Greg Hewgill Dec 17 '09 at 04:15

3 Answers3

14

It looks like SHTML = Server Side include HTML (SSI), which is just a fancy way of saying the server can dynamically inject code at the reference point (i.e. where the include is).

PHTML is HTML code with inline PHP processing instructions.

Mike Eng
  • 1,593
  • 4
  • 34
  • 53
GrayWizardx
  • 19,561
  • 2
  • 30
  • 43
  • 2
    PHTML is not an encoding method. That link is a PHTML encoder. That means it __encodes PHTML__. PHTML is just another way to say HTML code with inline PHP processing instructions. – Eli Grey Dec 18 '09 at 21:06
  • wait then what's the difference between phtml and plain php? – Fuseteam Oct 09 '20 at 22:03
8

Use static HTML when you want to have static content. Use SHTML if you want to do simple things such as includes. Use PHTML if you want to use logic (though it's possible to do with SHTML if you really want to).

Eli Grey
  • 35,104
  • 14
  • 75
  • 93
0

.phtml is usual extension to Phalcom PHP Framework files :)
Ref.: https://docs.phalconphp.com/en/latest/reference/tutorial.html

vuchkov
  • 154
  • 1
  • 5
  • 1
    **.phtml** was the standard file extension for PHP 2 programs and is still used in some rare cases http://stackoverflow.com/questions/11859015/what-is-phtml-and-when-should-i-use-a-phtml-extension-rather-than-php/11859122 – Fabian Horlacher Apr 04 '17 at 23:29