What is phtml, and when should I use a .phtml extension rather than .php?
问题 I'm wondering what the difference between .phtml and .php files is, and when to use one over the other. 回答1: There is usually no difference, as far as page rendering goes. It's a huge facility developer-side, though, when your web project grows bigger. I make use of both in this fashion: .PHP Page doesn't contain view-related code .PHTML Page contains little (if any) data logic and the most part of it is presentation-related 回答2: .phtml was the standard file extension for PHP 2 programs.