There is no error message from what I have seen, but nothing seems to be working…
I’m trying to get php code into .html files. It does not work by default, and that’s fine. I create a .htaccess file in the htdocs file in my directory, at put in the following code:
AddType application/x-httpd-php .htm .html
I save the file and try to make php code in an html file, but it’s not doing anything. I think it’s that the .htaccess isn’t working.
I have not found any error messages. (In the file or the website page)
By far the easiest way to make sure your PHP code gets executed is to put the code in a file with the .php extension. That’s guaranteed to work on every server that supports PHP.
If you want .html in your URLs, you can also just setup your code with the .php file extension and then use .htaccess RewriteRules to dynamically rewrite all .html URLs to .php. This example does that: https://stackoverflow.com/a/5990276
For going to route you took, I’m not sure if that works here. It might be that the line is wrong, I see examples with AddHandler instead of AddType and different content types too. And it might be that these .htaccess directives are not allowed on our hosting.