What am I doing wrong?
If the file is served by Apache , you have not enabled the PHP interpreter to run in html files. Apache (by default) does not start the php interpreter in html files.
why is he commented?
As others have noted, the browser does not know what to do with the php tag.
If you want to interpret php in html files instead of renaming files in .php, you can add the .html extension to the php interpreter as shown below:
AddType application/x-httpd-php .php .html
This line is in the httpd.conf file.
I do not suggest that this is the right way to do this, but I believe that it answers your first question.
CramerTV
source share