Thanks. I know that I can rename the file to .php. If you read my first post I said that I know that I can rename the file to .php.
The important part that I am trying to get across is that I paid money for a module that works. It's header and footer is a .html template file. It has <?php ... ?> calls in it and it works great! It was only until I modified it with some javascript that it stopped working. I undid the javascript edit but it still didn't work. I renamed it to .php and that page worked, but I was going to have to rename everyreference to the header.html file. I had a back up file of it and it still works, but because I added the javascript to that one file it stopped working. I have it working now, but only because of the back up file. I added the javascript again and it messed up again. It is working now, but it makes no sense to me for something to work, make a edit to the file--correct or not--undo the edit and it still not work. It should have no effect on the file if was working before you edited it, you edited it, then undid the edit.
I know that you can have a blah.html file with <?php ... ?> inside of it. This will work.
I have a cms , an error module, or a short url that I believe is messing with the extensions. I have been editing it and it stopped working. Then I noticed on my server it will not let me view a .html file with php inside of it. This should work:
a file named "test.html"
inside of the file:
<html>
<head>
</head>
<body>
<?php echo "Hello World"; ?>
</body>
</Html>
This should print out Hello World.
I do not know if it is better to use .php or phtml instead of .html or .htm. What I do know is I've got a module that has a header.html and footer.html with php code inside of it working. But when I try to view a "test.html" in my root directory with a simple <?php echo "Hello World"; ?> It doen't show. If I rename it "test.htm" it loads but shows a blank page. If I view the source of "test.htm" I can see the php code. And yes, if I name it "test.php" it works like it's suppose to.