php HTML vs SHTML vs PHTML

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1919399/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 04:18:24  来源:igfitidea点击:

HTML vs SHTML vs PHTML

htmlphpshtml

提问by A.N.M. Saiful Islam

What is the differencebetween:

有什么区别

HTML
SHTML
PHTML

Whyand wheni'll use whichone?

为什么以及什么时候我会使用一个?

采纳答案by GrayWizardx

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

它看起来像SHTML= 服务器端包含 HTML (SSI),这只是说服务器可以在参考点(即包含所在的位置)动态注入代码的一种奇特方式。

PHTMLis HTML code with inline PHP processing instructions.

PHTML是带有内联 PHP 处理指令的 HTML 代码。

回答by Eli Grey

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

当您想要静态内容时,请使用静态 HTML。如果您想做简单的事情,例如包含,请使用 SHTML 。如果您想使用逻辑,请使用 PHTML(尽管如果您真的想使用 SHTML,也可以使用它)。

回答by vuchkov

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

.phtml是 Phalcom PHP 框架文件的常用扩展名:)
参考:https: //docs.phalconphp.com/en/latest/reference/tutorial.html