How to include PHP code in .htm/.html pages?
To be able to execute PHP code in .htm/.html pages using our Standard PHP setup, add the following line in your website’s .htaccess file:
AddHandler application/x-httpd-recommended-php .php .htm .html
In case you are using the Ultrafast PHP setup, then the line to be added to your .htaccess file would be:
AddHandler application/x-httpd-php .php .htm .html
For the PHP code to be executed you should also disable the NGINX Direct Delivery for your website from your Site Tools -> Speed -> Caching -> NGINX Direct Delivery.