Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML vs SHTML vs PHTML

Tags:

html

php

shtml

What is the difference between:

HTML
SHTML
PHTML

Why and when i'll use which one?

like image 447
A.N.M. Saiful Islam Avatar asked Dec 17 '09 04:12

A.N.M. Saiful Islam


People also ask

What type of file is Phtml?

Web page that contains PHP code; parsed by a PHP engine on the Web server, which dynamically generates HTML; often used for database access, such as retrieving data from a MySQL database; can be run using Apache or Windows Server with the PHP engine installed.

What is Phtml?

phtml is a tool for transforming HTML with JavaScript. It fully embraces the HTML language, and aims to help you write and maintain HTML that you and future you feel good about.


2 Answers

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.

like image 99
GrayWizardx Avatar answered Oct 03 '22 19:10

GrayWizardx


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).

like image 33
Eli Grey Avatar answered Oct 03 '22 18:10

Eli Grey