In a previous thread, I mentioned that my host will not allow us to scan for php in files with the .htm extension. So files with a php htm mix need to have a different extension.
After looking at the situation for a while, the best option seems to be to use the .phtml extension for all the files ( not phtm, the L on the end makes a difference!).
index.phtml
page1.phtml
and so on.
The phtml extension seems to be recognised by the widest number of editors, browsers and interpreters as both php and html, but before I go ahead an adopt that extension, does anyone know of any browser or editor that does not correctly recognise the extension? Or of any other problems?
If you are saying that phtml does not meant php+html[/QUOTE]I'm saying the .phtml means nothing special (nor does .php, really). It all depends what the server is set up to parse as PHP (usually .php, somethind other things as well, such as .phtml or simply .html documents).
Really the documents are not php, they just contain some very small elements of php.[/quote]That's irrelevant. If it contains ANY PHP code at all, the document needs to be interpreted as PHP, so the code is executed. Since most servers are not set up to parse .html files as PHP code, you have to use an extention that is.
You wouldn't call an html document .js because it has one line of Java Script in it.[/quote]That's a non-issue, as JavaScript is interpreted on the client side.
I thought that phtml WAS a mix of the two, consequently would be OK, but you seem to be telling me that is not the case.[/QUOTE]I'm saying that BOTH are (or can be) a mix of the two, and the .phtml needs to be processed the same as .php. I really don't care which extention you use, I just use .php for portability.
I don't think you follow what I mean.
In IE and Firefox, the way they display a php and phtml is completely different.
Basically, if you display a php it will just display the source. If you display a phtml it displays the result, not the source.
The reulst being the displayable part of the html - not the php of course.[/QUOTE]
The fact that IE and Firefox both attempt to display a .phtml [/QUOTE]The whole point of a php file is that it a parsed. You don't want browsers opening php files but if a client saves one from a website it will automatically add the htm extention.
Suffice to say that when I am viewing the files in IE and Firefox, they are not on a server.
[/QUOTE]
I don't care what browser you use, they will all display the same in regards to a .php file. PHP is parsed by the server not the browser. Same goes for .phtml.[/quote]
<i>
</i><!--
<?php
... some php code ...
?>
-->
0.1.9 — BETA 4.29